summaryrefslogtreecommitdiffstats
path: root/apps/menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/menu.c')
-rw-r--r--apps/menu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/menu.c b/apps/menu.c
index c657c2c1ca..c8fc5f6264 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -411,17 +411,20 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected)
}
else if (action == ACTION_STD_CANCEL)
{
+ bool exiting_menu = false;
in_stringlist = false;
if (menu_callback)
menu_callback(ACTION_EXIT_MENUITEM, menu);
if (menu->flags&MENU_EXITAFTERTHISMENU)
done = true;
+ else if ((menu->flags&MENU_TYPE_MASK) == MT_MENU)
+ exiting_menu = true;
if (stack_top > 0)
{
stack_top--;
menu = menu_stack[stack_top];
- if (menu->flags&MENU_EXITAFTERTHISMENU)
+ if (!exiting_menu && (menu->flags&MENU_EXITAFTERTHISMENU))
done = true;
else
init_menu_lists(menu, &lists,