From e32ff6b40a40241e1707bdea2a6c6a3ca1038164 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 29 Jan 2017 21:27:45 +0100 Subject: [PATCH] hintbox: restore proper handling of up/down keys When no scrollbar is present, just pass through up/down keys instead of only canceling the hintbox. This restores the behaviour before commit 11b3307251. Prominent examle is the "channel not available" popup which prevented further channel switching until canceled. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/5f93b57d847900999c245636bef3d706ccbdd74b Author: Stefan Seyfried Date: 2017-01-29 (Sun, 29 Jan 2017) --- src/gui/widget/hintbox.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/gui/widget/hintbox.cpp b/src/gui/widget/hintbox.cpp index 9be2aae6f..8e513756a 100644 --- a/src/gui/widget/hintbox.cpp +++ b/src/gui/widget/hintbox.cpp @@ -219,16 +219,13 @@ int CHintBox::exec() { res = messages_return::cancel_all; } - else if ((msg == CRCInput::RC_up) || (msg == CRCInput::RC_down)) + else if (enable_txt_scroll && (msg == CRCInput::RC_up || msg == CRCInput::RC_down)) { - if (enable_txt_scroll){ - if (msg == CRCInput::RC_up) - this->scroll_up(); - else - this->scroll_down(); - } + /* if ! enable_txt_scroll, fall through to last else branch instead */ + if (msg == CRCInput::RC_up) + this->scroll_up(); else - res = messages_return::cancel_all; + this->scroll_down(); } else if (CNeutrinoApp::getInstance()->listModeKey(msg)){ // do nothing //TODO: if passed rc messages are ignored rc messaages: has no effect here too!!