fixes to menu stock items support (patch 1547639)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -769,10 +769,11 @@ wxString wxMenuItemBase::GetLabelFromText(const wxString& text)
|
||||
void wxMenuItem::SetText( const wxString& string )
|
||||
{
|
||||
wxString str = string;
|
||||
if (str.IsEmpty())
|
||||
if ( str.empty() && !IsSeparator() )
|
||||
{
|
||||
wxASSERT_MSG(wxIsStockID(GetId()), wxT("A non-stock menu item with an empty label?"));
|
||||
str = wxGetStockLabel(GetId(), wxSTOCK_WITH_ACCELERATOR|wxSTOCK_WITH_MNEMONIC);
|
||||
str = wxGetStockLabel(GetId(), wxSTOCK_WITH_ACCELERATOR |
|
||||
wxSTOCK_WITH_MNEMONIC);
|
||||
}
|
||||
|
||||
// Some optimization to avoid flicker
|
||||
|
Reference in New Issue
Block a user