ignore clicks on a toolbar but outside any button

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14550 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2002-03-11 11:43:48 +00:00
parent 6a0fab3a3a
commit 8b3fddc493

View 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);