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
This commit is contained in:
Vadim Zeitlin
2014-09-23 17:41:33 +00:00
parent 83eca161d7
commit 0005984a4c
2 changed files with 1 additions and 6 deletions

View File

@@ -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

View File

@@ -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();
}