]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/tbarbase.cpp
Don't delete model in views destructor as several
[wxWidgets.git] / src / common / tbarbase.cpp
index 47c85a2c61aae6e0d059ae9d5c6657f6a9ca2801..85f121426b495034579917a51822c4d0d1dcc240 100644 (file)
@@ -113,30 +113,6 @@ bool wxToolBarToolBase::SetLongHelp(const wxString& help)
     return true;
 }
 
-#if WXWIN_COMPATIBILITY_2_2
-
-const wxBitmap& wxToolBarToolBase::GetBitmap1() const
-{
-    return GetNormalBitmap();
-}
-
-const wxBitmap& wxToolBarToolBase::GetBitmap2() const
-{
-    return GetDisabledBitmap();
-}
-
-void wxToolBarToolBase::SetBitmap1(const wxBitmap& bmp)
-{
-    SetNormalBitmap(bmp);
-}
-
-void wxToolBarToolBase::SetBitmap2(const wxBitmap& bmp)
-{
-    SetDisabledBitmap(bmp);
-}
-
-#endif // WXWIN_COMPATIBILITY_2_2
-
 // ----------------------------------------------------------------------------
 // wxToolBarBase adding/deleting items
 // ----------------------------------------------------------------------------
@@ -433,7 +409,10 @@ void wxToolBarBase::UnToggleRadioGroup(wxToolBarToolBase *tool)
 
 void wxToolBarBase::ClearTools()
 {
-    WX_CLEAR_LIST(wxToolBarToolsList, m_tools);
+    while ( GetToolsCount() )
+    {
+        DeleteToolByPos(0);
+    }
 }
 
 bool wxToolBarBase::Realize()