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:
@@ -218,10 +218,6 @@ bool wxScrollThumb::HandleMouse(const wxMouseEvent& event) const
|
||||
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);
|
||||
}
|
||||
else // another mouse button released
|
||||
@@ -230,6 +226,10 @@ bool wxScrollThumb::HandleMouse(const wxMouseEvent& event) const
|
||||
return false;
|
||||
}
|
||||
|
||||
// release the mouse and free capture data
|
||||
delete m_captureData;
|
||||
wxConstCast(this, wxScrollThumb)->m_captureData = NULL;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user