]> git.saurik.com Git - wxWidgets.git/commitdiff
ignore clicks on a toolbar but outside any button
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 11 Mar 2002 11:43:48 +0000 (11:43 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 11 Mar 2002 11:43:48 +0000 (11:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14550 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/univ/toolbar.cpp

index c995466a661ee7690afbe602cbdb5373a4b229b8..774c5d5a75047e000daa4e8a733a3f5927a94567 100644 (file)
@@ -652,7 +652,7 @@ bool wxStdToolbarInputHandler::HandleMouse(wxInputConsumer *consumer,
     wxToolBar *tbar = wxStaticCast(consumer->GetInputWindow(), wxToolBar);
     wxToolBarToolBase *tool = tbar->FindToolForPosition(event.GetX(), event.GetY());
 
-    if ( tool && !tool->IsEnabled() )
+    if ( !tool || !tool->IsEnabled() )
         return TRUE;
 
     return wxStdButtonInputHandler::HandleMouse(consumer, event);