msgbox: remove duplicated code

This commit is contained in:
Stefan Seyfried
2017-03-04 19:55:59 +01:00
parent e1b50ee304
commit 71361684d8

View File

@@ -278,14 +278,11 @@ int CMsgBox::exec()
//***navi buttons for button selection*** //***navi buttons for button selection***
else if(msg == CRCInput::RC_right || msg == CRCInput::RC_left) 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); ccw_footer->setSelectedButton(selected+1);
mb_show_button = ccw_footer->getSelectedButtonObject()->getButtonAlias(); else
}
if (msg == CRCInput::RC_left) {
ccw_footer->setSelectedButton(selected-1); ccw_footer->setSelectedButton(selected-1);
mb_show_button = ccw_footer->getSelectedButtonObject()->getButtonAlias(); mb_show_button = ccw_footer->getSelectedButtonObject()->getButtonAlias();
}
selected = ccw_footer->getSelectedButton(); selected = ccw_footer->getSelectedButton();
//***refresh buttons only if we have more than one button, this avoids unnecessary repaints with possible flicker effects*** //***refresh buttons only if we have more than one button, this avoids unnecessary repaints with possible flicker effects***