X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/39d03faf4e69613abaa9b426946540c0939e3053..882fc8a922b52668732e0427131e66dae33a86d6:/src/common/menucmn.cpp diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index 86b1348379..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(); @@ -501,7 +504,7 @@ bool wxMenuBarBase::Insert(size_t pos, wxMenu *menu, { if ( pos == m_menus.GetCount() ) { - return Append(menu, title); + return wxMenuBarBase::Append(menu, title); } else {