]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/menu.cpp
ensure that IsDialogMessage() is not called in the situations when it may hang not...
[wxWidgets.git] / src / gtk1 / menu.cpp
index 10fee257c64899a109fb7768d8005927c5129b33..fa3f149dd054385613bb75c1d021055647c90e97 100644 (file)
@@ -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