Browse Source

Fixed bug with dash character in menu item

Fixed a bug where if the text for a menu item started with - then it
would auto be disabled.
Nathan Bowhay 10 years ago
parent
commit
f039c98f08
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Engine/source/gui/editor/guiMenuBar.cpp

+ 1 - 1
Engine/source/gui/editor/guiMenuBar.cpp

@@ -1018,7 +1018,7 @@ void GuiMenuBar::addSubmenuItem(Menu *menu, MenuItem *submenu, const char *text,
    newMenuItem->checkGroup = checkGroup;
    newMenuItem->checkGroup = checkGroup;
    newMenuItem->nextMenuItem = NULL;
    newMenuItem->nextMenuItem = NULL;
    newMenuItem->acceleratorIndex = 0;
    newMenuItem->acceleratorIndex = 0;
-   newMenuItem->enabled = text[0] != '-';
+   newMenuItem->enabled = (dStrlen(text) > 1 || text[0] != '-');
    newMenuItem->visible = true;
    newMenuItem->visible = true;
    newMenuItem->bitmapIndex = -1;
    newMenuItem->bitmapIndex = -1;