X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/90527a50d74bed6ed6b4d163e8170ae8c3f5d869..5942996c94a82dcbedf7b1041b08acd8d1d97449:/src/gtk1/menu.cpp?ds=sidebyside diff --git a/src/gtk1/menu.cpp b/src/gtk1/menu.cpp index 10fee257c6..fa3f149dd0 100644 --- a/src/gtk1/menu.cpp +++ b/src/gtk1/menu.cpp @@ -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