Click scrollbar will cause recapture mouse twice error, add check sentence before capture and release mouse in HandleMouse()

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

View File

@@ -1002,6 +1002,8 @@ bool wxStdScrollBarInputHandler::HandleMouse(wxInputConsumer *consumer,
{
m_btnCapture = btn;
m_winCapture = consumer->GetInputWindow();
if ( !m_winCapture->HasCapture() )
m_winCapture->CaptureMouse();
// generate the command
@@ -1065,6 +1067,7 @@ bool wxStdScrollBarInputHandler::HandleMouse(wxInputConsumer *consumer,
{
if ( m_winCapture )
{
if ( m_winCapture->HasCapture() )
StopScrolling(scrollbar);
// if we were dragging the thumb, send the last event