toggle corrected for click as well

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2005-02-20 16:41:09 +00:00
parent d351c8ee8f
commit 64f553a486

View File

@@ -149,7 +149,11 @@ static pascal OSStatus wxMacToolBarToolControlEventHandler( EventHandlerCallRef
wxToolBarTool* tbartool = (wxToolBarTool*)data ;
if ( tbartool->CanBeToggled() )
{
#ifdef __WXMAC_OSX__
((wxToolBar*)tbartool->GetToolBar())->ToggleTool(tbartool->GetId(), !tbartool->IsToggled() );
#else
((wxToolBar*)tbartool->GetToolBar())->ToggleTool(tbartool->GetId(), GetControl32BitValue((ControlRef)tbartool->GetControlHandle()));
#endif
}
((wxToolBar*)tbartool->GetToolBar())->OnLeftClick( tbartool->GetId() , tbartool -> IsToggled() ) ;
result = noErr;