]> git.saurik.com Git - wxWidgets.git/commitdiff
fix button double click handling (should be treated the same as single click)
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 28 Feb 2002 21:09:32 +0000 (21:09 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 28 Feb 2002 21:09:32 +0000 (21:09 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/univ/button.cpp

index fe2cedc46d80a5b509801144f9569b190c45d7de..05c25ef66b7cc18bb8ea664413ef543e40e92802 100644 (file)
@@ -286,7 +286,7 @@ bool wxStdButtonInputHandler::HandleMouse(wxInputConsumer *consumer,
     // the other mouse buttons are ignored
     if ( event.Button(1) )
     {
-        if ( event.ButtonDown(1) )
+        if ( event.LeftDown() || event.LeftDClick() )
         {
             m_winCapture = consumer->GetInputWindow();
             m_winCapture->CaptureMouse();
@@ -296,7 +296,7 @@ bool wxStdButtonInputHandler::HandleMouse(wxInputConsumer *consumer,
 
             return TRUE;
         }
-        else // up
+        else if ( event.LeftUp() )
         {
             if ( m_winCapture )
             {
@@ -314,6 +314,7 @@ bool wxStdButtonInputHandler::HandleMouse(wxInputConsumer *consumer,
             //else: the mouse was released outside the window, this doesn't
             //      count as a click
         }
+        //else: don't do anything special about the double click
     }
 
     return wxStdInputHandler::HandleMouse(consumer, event);