- if (sText.IsEmpty())
- {
- wxASSERT_MSG(wxIsStockID(GetId()), wxT("A non-stock menu item with an empty label?"));
- sText = wxGetStockLabel(GetId(), wxSTOCK_WITH_ACCELERATOR|wxSTOCK_WITH_MNEMONIC);
- }
+ // wxMenuItemBase will do stock ID checks
+ wxMenuItemBase::SetItemLabel(sText);
+
+ // m_text could now be different from 'text' if we are a stock menu item,
+ // so use only m_text below