]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/tbarsmpl.cpp
corrected CodeWarrior project target names and generated application names
[wxWidgets.git] / src / generic / tbarsmpl.cpp
index 33d0dfeb9f42a34193399180107e77b5e0084f19..42557f2885dec07199b0fc81f445fb8e3081579c 100644 (file)
@@ -85,6 +85,12 @@ public:
 
 IMPLEMENT_DYNAMIC_CLASS(wxToolBarSimple, wxToolBarBase)
 
 
 IMPLEMENT_DYNAMIC_CLASS(wxToolBarSimple, wxToolBarBase)
 
+#if !wxUSE_TOOLBAR_NATIVE || defined(__WXUNIVERSAL__)
+    #include "wx/toolbar.h"
+
+    IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxToolBarSimple)
+#endif
+
 BEGIN_EVENT_TABLE(wxToolBarSimple, wxToolBarBase)
     EVT_SIZE(wxToolBarSimple::OnSize)
     EVT_SCROLL(wxToolBarSimple::OnScroll)
 BEGIN_EVENT_TABLE(wxToolBarSimple, wxToolBarBase)
     EVT_SIZE(wxToolBarSimple::OnSize)
     EVT_SCROLL(wxToolBarSimple::OnScroll)
@@ -682,7 +688,8 @@ void wxToolBarSimple::SpringUpButton(int id)
 
     if ( tool && tool->CanBeToggled() )
     {
 
     if ( tool && tool->CanBeToggled() )
     {
-        tool->Toggle();
+        if (tool->IsToggled())
+            tool->Toggle();
 
         DrawTool(tool);
     }
 
         DrawTool(tool);
     }