From d45fdc114a410515a92261589e99d2acf5fbc2eb Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 23 Sep 2014 17:38:54 +0000 Subject: [PATCH] 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 --- src/univ/scrthumb.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/univ/scrthumb.cpp b/src/univ/scrthumb.cpp index 2fbd3ed888..d5f3946880 100644 --- a/src/univ/scrthumb.cpp +++ b/src/univ/scrthumb.cpp @@ -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; }