fix asserts for dropdown items

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-06-22 20:18:33 +00:00
parent 8c714e065c
commit 7062497fde

View File

@@ -137,6 +137,7 @@ public:
wxFAIL_MSG( _T("unknown toolbar child type") );
// fall through
case wxITEM_DROPDOWN:
case wxITEM_NORMAL:
return GTK_TOOLBAR_CHILD_BUTTON;
}
@@ -520,14 +521,11 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
int posGtk = 0;
if ( pos > 0 )
{
size_t i;
for (i = 0; i < pos; i++)
for ( size_t i = 0; i < pos; i++ )
{
posGtk++;
// if we have a dropdown menu, we use 2 GTK tools
// internally
// if we have a dropdown menu, we use 2 GTK tools internally
wxToolBarToolsList::compatibility_iterator node = m_tools.Item( i );
wxToolBarTool *tool = (wxToolBarTool*) node->GetData();
if ( tool->IsButton() && (tool->GetKind() == wxITEM_DROPDOWN) )