summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3b6a117)
Use DeleteTool in ClearTools instead of just destroying the internal
list, so the toolbar is kept fully in sync with the removal of all
tool types. Also fix wxMSW version to actually Destroy() the controls
when they are deleted from the toolbar.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37615
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void wxToolBarBase::ClearTools()
{
void wxToolBarBase::ClearTools()
{
- WX_CLEAR_LIST(wxToolBarToolsList, m_tools);
+ while ( GetToolsCount() )
+ {
+ DeleteToolByPos(0);
+ }
}
bool wxToolBarBase::Realize()
}
bool wxToolBarBase::Realize()
{
nButtonsToDelete = ((wxToolBarTool *)tool)->GetSeparatorsCount();
width *= nButtonsToDelete;
{
nButtonsToDelete = ((wxToolBarTool *)tool)->GetSeparatorsCount();
width *= nButtonsToDelete;
+ tool->GetControl()->Destroy();
}
// do delete all buttons
}
// do delete all buttons