From ffd09892f94d2123e285a3f31d46b386e704b1c1 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Wed, 21 Oct 2020 13:17:07 +0200 Subject: [PATCH] DoubleSlider : Fixed motion of the upper thumb, when no one thumb is active --- src/slic3r/GUI/DoubleSlider.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/slic3r/GUI/DoubleSlider.cpp b/src/slic3r/GUI/DoubleSlider.cpp index a4cea3e284..911ee9c420 100644 --- a/src/slic3r/GUI/DoubleSlider.cpp +++ b/src/slic3r/GUI/DoubleSlider.cpp @@ -2002,13 +2002,11 @@ void Control::move_current_thumb_to_pos(wxPoint pos) const int mouse_val = tick_val >= 0 && m_draw_mode == dmRegular ? tick_val : get_value_from_position(pos); if (mouse_val >= 0) { - // if (abs(mouse_val - m_lower_value) < abs(mouse_val - m_higher_value)) { - // if (mouse_val <= m_lower_value) { if (m_selection == ssLower) { SetLowerValue(mouse_val); correct_lower_value(); } - else if (m_selection == ssHigher) { + else { // even m_selection is ssUndef, upper thumb should be selected SetHigherValue(mouse_val); correct_higher_value(); }