From 42628d70454f2d0b2f46c9828d7797fe3c14904c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Mon, 22 Oct 2018 11:46:28 +0200 Subject: [PATCH] [escher] Fix HandleEvent on NestedMenuController --- escher/src/nested_menu_controller.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/escher/src/nested_menu_controller.cpp b/escher/src/nested_menu_controller.cpp index cc2498745..eaf883219 100644 --- a/escher/src/nested_menu_controller.cpp +++ b/escher/src/nested_menu_controller.cpp @@ -134,16 +134,16 @@ int NestedMenuController::stackDepth() { return m_stack.depth(); } -bool NestedMenuController::handleEventForRow(Ion::Events::Event event, int selectedRow) { +bool NestedMenuController::handleEventForRow(Ion::Events::Event event, int rowIndex) { int depth = m_stack.depth(); if ((event == Ion::Events::Back || event == Ion::Events::Left) && depth > 0) { return returnToPreviousMenu(); } - if ((event == Ion::Events::OK || event == Ion::Events::EXE || event == Ion::Events::Right) && typeAtLocation(0, selectedRow) == NodeCellType) { - return selectSubMenu(selectedRow); + if ((event == Ion::Events::OK || event == Ion::Events::EXE || event == Ion::Events::Right) && typeAtLocation(0, selectedRow()) == NodeCellType) { + return selectSubMenu(rowIndex); } - if ((event == Ion::Events::OK || event == Ion::Events::EXE) && typeAtLocation(0, selectedRow) == LeafCellType) { - return selectLeaf(selectedRow); + if ((event == Ion::Events::OK || event == Ion::Events::EXE) && typeAtLocation(0, selectedRow()) == LeafCellType) { + return selectLeaf(rowIndex); } return false; }