Fixed bug [ 1166937 ] Toolbar.DeleteToolByPos

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2005-03-25 22:39:20 +00:00
parent df467a9d74
commit 4a64a89c2f
2 changed files with 12 additions and 4 deletions

View File

@ -519,7 +519,7 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
return TRUE;
}
bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *toolBase)
{
wxToolBarTool *tool = (wxToolBarTool *)toolBase;
@ -533,7 +533,11 @@ bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
gtk_widget_destroy( tool->m_item );
break;
//case wxTOOL_STYLE_SEPARATOR: -- nothing to do
#ifdef __WXGTK20__
case wxTOOL_STYLE_SEPARATOR:
gtk_toolbar_remove_space( m_toolbar, pos );
break;
#endif
}
InvalidateBestSize();

View File

@ -519,7 +519,7 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
return TRUE;
}
bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *toolBase)
{
wxToolBarTool *tool = (wxToolBarTool *)toolBase;
@ -533,7 +533,11 @@ bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
gtk_widget_destroy( tool->m_item );
break;
//case wxTOOL_STYLE_SEPARATOR: -- nothing to do
#ifdef __WXGTK20__
case wxTOOL_STYLE_SEPARATOR:
gtk_toolbar_remove_space( m_toolbar, pos );
break;
#endif
}
InvalidateBestSize();