]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/tbarbase.cpp
i18n files are installed as part of wxBase (and should be ideally part of separate...
[wxWidgets.git] / src / common / tbarbase.cpp
index 6f94c924cc8c75669be35aadbb483b1d1d24fe24..7814a7b4ae2604fd193f79e69c5fe6fa986a56b6 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        common/tbarbase.cpp
+// Name:        src/common/tbarbase.cpp
 // Purpose:     wxToolBarBase implementation
 // Author:      Julian Smart
 // Modified by: VZ at 11.12.99 (wxScrollableToolBar split off)
 
 #if wxUSE_TOOLBAR
 
+#include "wx/toolbar.h"
+
 #ifndef WX_PRECOMP
     #include "wx/control.h"
-#endif
-
-#include "wx/frame.h"
-
-#if wxUSE_IMAGE
-    #include "wx/image.h"
+    #include "wx/frame.h"
     #include "wx/settings.h"
-#endif // wxUSE_IMAGE
-
-#include "wx/toolbar.h"
+    #include "wx/image.h"
+#endif
 
 // ----------------------------------------------------------------------------
 // wxWidgets macros
@@ -409,7 +405,10 @@ void wxToolBarBase::UnToggleRadioGroup(wxToolBarToolBase *tool)
 
 void wxToolBarBase::ClearTools()
 {
-    WX_CLEAR_LIST(wxToolBarToolsList, m_tools);
+    while ( GetToolsCount() )
+    {
+        DeleteToolByPos(0);
+    }
 }
 
 bool wxToolBarBase::Realize()