Allow for menus when deleting a tool
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@61236 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -276,6 +276,10 @@ bool wxToolMenuBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *tool)
|
|||||||
|
|
||||||
bool wxToolMenuBar::DoDeleteTool(size_t 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:
|
// 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
|
// 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
|
// them, the indices are not the same for us and the toolbar
|
||||||
|
Reference in New Issue
Block a user