fixed FindItem() to work with submenus

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-01-23 17:30:22 +00:00
parent 2c8c812ff3
commit adb21613bc

View File

@@ -266,7 +266,10 @@ int wxMenuBase::FindItem(const wxString& text) const
if ( rc != wxNOT_FOUND )
return rc;
}
else if ( !item->IsSeparator() )
// we execute this code for submenus as well to alllow finding them by
// name just like the ordinary items
if ( !item->IsSeparator() )
{
if ( item->GetLabel() == label )
return item->GetId();