From: Stefan Csomor Date: Sun, 20 Feb 2005 16:41:09 +0000 (+0000) Subject: toggle corrected for click as well X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/64f553a4860f74ac47581db3864795b23e7ae002?ds=inline toggle corrected for click as well git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/toolbar.cpp b/src/mac/carbon/toolbar.cpp index 45c2ae0e27..cdefd9ccbb 100644 --- a/src/mac/carbon/toolbar.cpp +++ b/src/mac/carbon/toolbar.cpp @@ -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;