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:
@@ -519,7 +519,7 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
|
bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *toolBase)
|
||||||
{
|
{
|
||||||
wxToolBarTool *tool = (wxToolBarTool *)toolBase;
|
wxToolBarTool *tool = (wxToolBarTool *)toolBase;
|
||||||
|
|
||||||
@@ -533,7 +533,11 @@ bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
|
|||||||
gtk_widget_destroy( tool->m_item );
|
gtk_widget_destroy( tool->m_item );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//case wxTOOL_STYLE_SEPARATOR: -- nothing to do
|
#ifdef __WXGTK20__
|
||||||
|
case wxTOOL_STYLE_SEPARATOR:
|
||||||
|
gtk_toolbar_remove_space( m_toolbar, pos );
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
InvalidateBestSize();
|
InvalidateBestSize();
|
||||||
|
@@ -519,7 +519,7 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
|
bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *toolBase)
|
||||||
{
|
{
|
||||||
wxToolBarTool *tool = (wxToolBarTool *)toolBase;
|
wxToolBarTool *tool = (wxToolBarTool *)toolBase;
|
||||||
|
|
||||||
@@ -533,7 +533,11 @@ bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
|
|||||||
gtk_widget_destroy( tool->m_item );
|
gtk_widget_destroy( tool->m_item );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//case wxTOOL_STYLE_SEPARATOR: -- nothing to do
|
#ifdef __WXGTK20__
|
||||||
|
case wxTOOL_STYLE_SEPARATOR:
|
||||||
|
gtk_toolbar_remove_space( m_toolbar, pos );
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
InvalidateBestSize();
|
InvalidateBestSize();
|
||||||
|
Reference in New Issue
Block a user