destroying native and wx controls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -665,6 +665,23 @@ bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *tool)
|
|||||||
|
|
||||||
tool->Detach();
|
tool->Detach();
|
||||||
|
|
||||||
|
wxToolBarTool* tl = wx_static_cast( wxToolBarTool* , tool ) ;
|
||||||
|
switch ( tool->GetStyle() )
|
||||||
|
{
|
||||||
|
case wxTOOL_STYLE_CONTROL:
|
||||||
|
tool->GetControl()->Destroy();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case wxTOOL_STYLE_BUTTON:
|
||||||
|
case wxTOOL_STYLE_SEPARATOR:
|
||||||
|
if ( tl->GetControlHandle() )
|
||||||
|
{
|
||||||
|
DisposeControl( (ControlRef) tl->GetControlHandle() ) ;
|
||||||
|
tl->SetControlHandle( (ControlRef) NULL ) ;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// and finally reposition all the controls after this one
|
// and finally reposition all the controls after this one
|
||||||
|
|
||||||
for ( /* node -> first after deleted */ ; node; node = node->GetNext() )
|
for ( /* node -> first after deleted */ ; node; node = node->GetNext() )
|
||||||
|
Reference in New Issue
Block a user