浏览代码

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 年之前
父节点
当前提交
f039c98f08
共有 1 个文件被更改,包括 1 次插入1 次删除
  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->nextMenuItem = NULL;
    newMenuItem->acceleratorIndex = 0;
-   newMenuItem->enabled = text[0] != '-';
+   newMenuItem->enabled = (dStrlen(text) > 1 || text[0] != '-');
    newMenuItem->visible = true;
    newMenuItem->bitmapIndex = -1;