[escher] NestedMenuController: Fix bug, select leaf or sub menu only if

there is a selected row
This commit is contained in:
Émilie Feral
2018-10-25 15:32:42 +02:00
parent 162df78d69
commit a40aeb0355

View File

@@ -139,6 +139,9 @@ bool NestedMenuController::handleEventForRow(Ion::Events::Event event, int rowIn
if ((event == Ion::Events::Back || event == Ion::Events::Left) && depth > 0) {
return returnToPreviousMenu();
}
if (selectedRow() < 0) {
return false;
}
if ((event == Ion::Events::OK || event == Ion::Events::EXE || event == Ion::Events::Right) && typeAtLocation(0, selectedRow()) == NodeCellType) {
return selectSubMenu(rowIndex);
}