From 7df03ec7624044eb293ba223cbe047f04ce54e97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Wed, 13 Jun 2018 11:55:16 +0200 Subject: [PATCH] [code] In lock-on-console mode: enable poping controllers on the stack which are above the console controller --- apps/code/console_controller.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/code/console_controller.cpp b/apps/code/console_controller.cpp index ca5043f93..6ff68c3c1 100644 --- a/apps/code/console_controller.cpp +++ b/apps/code/console_controller.cpp @@ -286,7 +286,12 @@ bool ConsoleController::textFieldDidAbortEditing(TextField * textField) { askInputRunLoopTermination(); } else { #if EPSILON_GETOPT - if (!m_locked) { + /* In order to lock the console controller, we disable poping controllers + * below the console controller included. The stack should only hold: + * - the menu controller + * - the console controller + * The depth of the stack controller must always be above or equal to 2. */ + if (!m_locked || stackViewController()->depth() > 2) { #endif stackViewController()->pop(); #if EPSILON_GETOPT