Fixes the member-of-class check order to properly sort the context. Also fixes a bug with the spacer entries being filtered from the popup menu, which threw off the selection.

This commit is contained in:
Areloch 2016-07-06 00:46:16 -05:00
parent 906cc0ef39
commit 51049b6e8c
2 changed files with 19 additions and 17 deletions

View file

@ -99,7 +99,9 @@ void PopupMenu::createPlatformMenu()
S32 PopupMenu::insertItem(S32 pos, const char *title, const char* accelerator, const char* cmd)
{
GuiMenuBar::MenuItem *item = GuiMenuBar::findMenuItem( mData->mMenuGui, title );
if(item)
//We'll make a special exception for the spacer items
if(item && dStrcmp(title, ""))
{
setItem( pos, title, accelerator, cmd);
return pos;