From 0005984a4cf963775653182f40e0e55f82bc6833 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 23 Sep 2014 17:41:33 +0000 Subject: [PATCH] Make slider thumb could moving when use mouse drag it, and also set the slider value according to the thumb position git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77808 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/univ/scrthumb.cpp | 2 +- src/univ/slider.cpp | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/univ/scrthumb.cpp b/src/univ/scrthumb.cpp index d95aedee60..604c4044b5 100644 --- a/src/univ/scrthumb.cpp +++ b/src/univ/scrthumb.cpp @@ -239,7 +239,7 @@ bool wxScrollThumb::HandleMouseMove(const wxMouseEvent& event) const { if ( HasCapture() ) { - if ( (m_captureData->m_shaftPart == Shaft_Thumb) && event.Moving() ) + if ( (m_captureData->m_shaftPart == Shaft_Thumb) && event.Dragging() ) { // make the thumb follow the mouse by keeping the same offset // between the mouse position and the top/left of the thumb diff --git a/src/univ/slider.cpp b/src/univ/slider.cpp index 88b6b914b0..34450b469a 100644 --- a/src/univ/slider.cpp +++ b/src/univ/slider.cpp @@ -804,11 +804,6 @@ bool wxSlider::PerformAction(const wxControlAction& action, action == wxACTION_SLIDER_THUMB_MOVE ) { scrollEvent = wxEVT_SCROLL_THUMBTRACK; - - // we shouldn't generate a command event about this change but we still - // should update our value and the slider appearance - valueChanged = false; - m_value = value = (int)numArg; Refresh(); }