// adding/removing tools
// ----------------------------------------------------------------------------
-bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *tool)
+bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos),
+ wxToolBarToolBase * WXUNUSED(tool))
{
// nothing special to do here - we really create the toolbar buttons in
// Realize() later
- tool->Attach(this);
-
InvalidateBestSize();
return true;
}
{
nButtonsToDelete = ((wxToolBarTool *)tool)->GetSeparatorsCount();
width *= nButtonsToDelete;
- tool->GetControl()->Destroy();
}
// do delete all buttons
}
}
- tool->Detach();
-
// and finally reposition all the controls after this button (the toolbar
// takes care of all normal items)
for ( /* node -> first after deleted */ ; node; node = node->GetNext() )