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:
@@ -1002,7 +1002,9 @@ bool wxStdScrollBarInputHandler::HandleMouse(wxInputConsumer *consumer,
|
|||||||
{
|
{
|
||||||
m_btnCapture = btn;
|
m_btnCapture = btn;
|
||||||
m_winCapture = consumer->GetInputWindow();
|
m_winCapture = consumer->GetInputWindow();
|
||||||
m_winCapture->CaptureMouse();
|
|
||||||
|
if ( !m_winCapture->HasCapture() )
|
||||||
|
m_winCapture->CaptureMouse();
|
||||||
|
|
||||||
// generate the command
|
// generate the command
|
||||||
bool hasAction = true;
|
bool hasAction = true;
|
||||||
@@ -1065,7 +1067,8 @@ bool wxStdScrollBarInputHandler::HandleMouse(wxInputConsumer *consumer,
|
|||||||
{
|
{
|
||||||
if ( m_winCapture )
|
if ( m_winCapture )
|
||||||
{
|
{
|
||||||
StopScrolling(scrollbar);
|
if ( m_winCapture->HasCapture() )
|
||||||
|
StopScrolling(scrollbar);
|
||||||
|
|
||||||
// if we were dragging the thumb, send the last event
|
// if we were dragging the thumb, send the last event
|
||||||
if ( m_htLast == wxHT_SCROLLBAR_THUMB )
|
if ( m_htLast == wxHT_SCROLLBAR_THUMB )
|
||||||
|
Reference in New Issue
Block a user