X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/32db328c7a66ab2c479e1b9dc567b74e0f23257e..7818b39874176b529be814fdfdfb773d8b211d3a:/src/common/menucmn.cpp diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index 74818ae0a9..ff228f99dc 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -24,6 +24,8 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#include + #ifdef __BORLANDC__ #pragma hdrstop #endif @@ -252,7 +254,7 @@ bool wxMenuBase::DoDestroy(wxMenuItem *item) // Finds the item id matching the given string, -1 if not found. int wxMenuBase::FindItem(const wxString& text) const { - wxString label = wxMenuItem(NULL, wxID_SEPARATOR, text).GetLabel(); + wxString label = wxMenuItem::GetLabelFromText(text); for ( wxMenuItemList::Node *node = m_items.GetFirst(); node; node = node->GetNext() )