CMenuWidget: fix "left" key for menuchoosers where

the "decrement menu function" got lost by the last "simplify code and
add missing break" commit. The implicit fallthrough actually was used to
execute the "left" function.
Reorganize the code so that it works even without the implicit
fallthrough.


Origin commit data
------------------
Branch: ni/coolstream
Commit: fea586b311
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2017-09-29 (Fri, 29 Sep 2017)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2017-09-29 20:37:37 +02:00
committed by vanhofen
parent 9f3ba8341f
commit ee8a577fef

View File

@@ -949,21 +949,19 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
break;
}
case (CRCInput::RC_left):
if (hasItem() && selected > -1 && (int)items.size() > selected) {
CMenuItem* itemX = items[selected];
if (!itemX->isMenueOptionChooser() && g_settings.menu_left_exit)
msg = CRCInput::RC_timeout;
}
break;
case (CRCInput::RC_right):
case (CRCInput::RC_ok):
{
if (hasItem() && selected > -1 && (int)items.size() > selected) {
//NI lcd4l-support
LCD4l->RemoveFile("/tmp/lcd/menu");
//exec this item...
CMenuItem* item = items[selected];
if (msg == CRCInput::RC_left && g_settings.menu_left_exit &&
!item->isMenueOptionChooser()) {
msg = CRCInput::RC_timeout;
break;
}
if (!item->isSelectable())
break;
item->msg = msg;
@@ -992,7 +990,6 @@ int CMenuWidget::exec(CMenuTarget* parent, const std::string &)
}
} else
msg = CRCInput::RC_timeout;
}
break;
case (CRCInput::RC_home):