From aa838aed9a43ae2ccbf79d00f9724aad850aea7e Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 28 Jun 2009 17:01:13 +0000 Subject: [PATCH] Allow for menus when deleting a tool git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/wince/tbarwce.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/msw/wince/tbarwce.cpp b/src/msw/wince/tbarwce.cpp index ce45117cf4..580e11d626 100644 --- a/src/msw/wince/tbarwce.cpp +++ b/src/msw/wince/tbarwce.cpp @@ -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 -- 2.50.0