fix: Force update after running input command

This commit is contained in:
Michael Carlberg 2017-01-13 14:33:16 +01:00
parent 989e4c3039
commit 57e8914fa6
2 changed files with 6 additions and 8 deletions

View File

@ -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());
}

View File

@ -85,16 +85,13 @@ namespace modules {
}
bool menu_module::input(string&& cmd) {
if (cmd.compare(0, 4, "menu") != 0) {
if (m_level > -1) {
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;
broadcast();
break;
}
}
}
return false;
}