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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user