From 57e8914fa62a5bb26c5b355220f199412f81b2bd Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Fri, 13 Jan 2017 14:33:16 +0100 Subject: [PATCH] fix: Force update after running input command --- src/components/controller.cpp | 1 + src/modules/menu.cpp | 13 +++++-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/components/controller.cpp b/src/components/controller.cpp index 6dd61f24..ca4f465e 100644 --- a/src/components/controller.cpp +++ b/src/components/controller.cpp @@ -399,6 +399,7 @@ void controller::process_inputdata() { m_command = command_util::make_command(move(cmd)); m_command->exec(); m_command.reset(); + process_update(true); } catch (const application_error& err) { m_log.err("controller: Error while forwarding input to shell -> %s", err.what()); } diff --git a/src/modules/menu.cpp b/src/modules/menu.cpp index 8a05cb1d..1879d8f6 100644 --- a/src/modules/menu.cpp +++ b/src/modules/menu.cpp @@ -85,14 +85,11 @@ namespace modules { } bool menu_module::input(string&& cmd) { - if (cmd.compare(0, 4, "menu") != 0) { - if (m_level > -1) { - for (auto&& item : m_levels[m_level]->items) { - if (item->exec == cmd) { - m_level = -1; - broadcast(); - break; - } + if (cmd.compare(0, 4, "menu") != 0 && m_level > -1) { + for (auto&& item : m_levels[m_level]->items) { + if (item->exec == cmd) { + m_level = -1; + break; } } return false;