Release the mouse and capture data at the end of the function. This was not always done before and it was wrong because other event such as mouse left up will not release mouse

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77761 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-09-23 17:38:54 +00:00
parent 8e238e367e
commit d45fdc114a

View File

@@ -218,10 +218,6 @@ bool wxScrollThumb::HandleMouse(const wxMouseEvent& event) const
m_control->OnThumbDragEnd(GetThumbPos(event)); m_control->OnThumbDragEnd(GetThumbPos(event));
} }
// release the mouse and free capture data
delete m_captureData;
wxConstCast(this, wxScrollThumb)->m_captureData = NULL;
m_control->SetShaftPartState(shaftPart, wxCONTROL_PRESSED, false); m_control->SetShaftPartState(shaftPart, wxCONTROL_PRESSED, false);
} }
else // another mouse button released else // another mouse button released
@@ -230,6 +226,10 @@ bool wxScrollThumb::HandleMouse(const wxMouseEvent& event) const
return false; return false;
} }
// release the mouse and free capture data
delete m_captureData;
wxConstCast(this, wxScrollThumb)->m_captureData = NULL;
return true; return true;
} }