X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3c7fc996a73e9f6a83067bc28a3c5581a3fee65..cfa3b25626fbcb8794d4c009d86dea6e864440a8:/src/univ/menu.cpp diff --git a/src/univ/menu.cpp b/src/univ/menu.cpp index e2e7f7ab8f..0a29b8ada5 100644 --- a/src/univ/menu.cpp +++ b/src/univ/menu.cpp @@ -1538,18 +1538,12 @@ void wxMenuItem::UpdateAccelInfo() m_strAccel = m_text.AfterFirst(_T('\t')); } -void wxMenuItem::SetText(const wxString& txt) +void wxMenuItem::SetText(const wxString& text) { - if ( txt != m_text ) + if ( text != m_text ) { - wxString text = txt; - if (text.IsEmpty()) - { - wxASSERT_MSG(wxIsStockID(GetId()), wxT("A non-stock menu item with an empty label?")); - text = wxGetStockLabel(GetId(), wxSTOCK_WITH_ACCELERATOR|wxSTOCK_WITH_MNEMONIC); - } - // first call the base class version to change m_text + // (and also check if we don't have a stock menu item) wxMenuItemBase::SetText(text); UpdateAccelInfo();