]> git.saurik.com Git - wxWidgets.git/commitdiff
toggle corrected for click as well
authorStefan Csomor <csomor@advancedconcepts.ch>
Sun, 20 Feb 2005 16:41:09 +0000 (16:41 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sun, 20 Feb 2005 16:41:09 +0000 (16:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/toolbar.cpp

index 45c2ae0e2780f768683bb12bc7a5e790b84103db..cdefd9ccbb619587c77bd77afbde50855b0806cb 100644 (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;