From c3ab1b91d8f8f37db510106cb321d5c9a1c8cde0 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 4 Mar 2017 19:55:59 +0100 Subject: [PATCH] msgbox: remove duplicated code --- src/gui/widget/msgbox.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/gui/widget/msgbox.cpp b/src/gui/widget/msgbox.cpp index 12caa52ef..4bed64224 100644 --- a/src/gui/widget/msgbox.cpp +++ b/src/gui/widget/msgbox.cpp @@ -279,14 +279,11 @@ int CMsgBox::exec() //***navi buttons for button selection*** else if(msg == CRCInput::RC_right || msg == CRCInput::RC_left) { - if (msg == CRCInput::RC_right) { + if (msg == CRCInput::RC_right) ccw_footer->setSelectedButton(selected+1); - mb_show_button = ccw_footer->getSelectedButtonObject()->getButtonAlias(); - } - if (msg == CRCInput::RC_left) { + else ccw_footer->setSelectedButton(selected-1); - mb_show_button = ccw_footer->getSelectedButtonObject()->getButtonAlias(); - } + mb_show_button = ccw_footer->getSelectedButtonObject()->getButtonAlias(); selected = ccw_footer->getSelectedButton(); //***refresh buttons only if we have more than one button, this avoids unnecessary repaints with possible flicker effects***