Fixed problem that would cause the "Return To Prior Menu" menu item to not stick

if one is calling ui_menu_reset() with UI_MENU_RESET_REMEMBER_POSITION, and that
menu item is selected
This commit is contained in:
Nathan Woods 2008-08-21 11:26:37 +00:00
parent a211e37694
commit ef062182ce

View File

@ -556,6 +556,8 @@ void ui_menu_item_append(ui_menu *menu, const char *text, const char *subtext, U
/* update the selection if we need to */
if (menu->resetpos == index || (menu->resetref != NULL && menu->resetref == ref))
menu->selected = index;
if (menu->resetpos == menu->numitems - 1)
menu->selected = menu->numitems - 1;
}