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:
@@ -652,7 +652,7 @@ bool wxStdToolbarInputHandler::HandleMouse(wxInputConsumer *consumer,
|
|||||||
wxToolBar *tbar = wxStaticCast(consumer->GetInputWindow(), wxToolBar);
|
wxToolBar *tbar = wxStaticCast(consumer->GetInputWindow(), wxToolBar);
|
||||||
wxToolBarToolBase *tool = tbar->FindToolForPosition(event.GetX(), event.GetY());
|
wxToolBarToolBase *tool = tbar->FindToolForPosition(event.GetX(), event.GetY());
|
||||||
|
|
||||||
if ( tool && !tool->IsEnabled() )
|
if ( !tool || !tool->IsEnabled() )
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
return wxStdButtonInputHandler::HandleMouse(consumer, event);
|
return wxStdButtonInputHandler::HandleMouse(consumer, event);
|
||||||
|
Reference in New Issue
Block a user