]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/toolbar.cpp
toggle corrected for click as well
[wxWidgets.git] / 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;