]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/menucmn.cpp
some stupid attempts to make utf8 work - it doesn't, but the code does no harm and...
[wxWidgets.git] / src / common / menucmn.cpp
index fd1cc38a1e135b7abfd61c9a6bec376ad92c96c2..d003b79a66da60d316af5c004bdac7994dfc5468 100644 (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();