X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/186baeb23726399569b1b2c972b36a3aecefa10e..32a2907bd33438d2119d587aa9656c0d94e6e460:/src/common/menucmn.cpp diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index fd1cc38a1e..d003b79a66 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -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();