]> git.saurik.com Git - wxWidgets.git/commitdiff
Allow for menus when deleting a tool
authorJulian Smart <julian@anthemion.co.uk>
Sun, 28 Jun 2009 17:01:13 +0000 (17:01 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 28 Jun 2009 17:01:13 +0000 (17:01 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/wince/tbarwce.cpp

index ce45117cf40ba03f216efab6bec83268ffbaa4d8..580e11d62694065381a7ca6ec347eba6ef2aa243 100644 (file)
@@ -272,6 +272,10 @@ bool wxToolMenuBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *tool)
 
 bool wxToolMenuBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool)
 {
+    // Skip over the menus
+    if (GetMenuBar())
+        pos += GetMenuBar()->GetMenuCount();
+        
     // the main difficulty we have here is with the controls in the toolbars:
     // as we (sometimes) use several separators to cover up the space used by
     // them, the indices are not the same for us and the toolbar