From 824bc8aed9f3eb5f38ec14dbe73289c9e63fa694 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Tue, 2 May 2017 14:15:23 +0200 Subject: [PATCH] [apps] In variable controller, improve hiding of lists and matrices variables Change-Id: Ib09718b675d7f96be91572134e48173defa39db1 --- apps/variable_box_controller.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/apps/variable_box_controller.cpp b/apps/variable_box_controller.cpp index 76f1bbc06..679e40916 100644 --- a/apps/variable_box_controller.cpp +++ b/apps/variable_box_controller.cpp @@ -33,8 +33,11 @@ void VariableBoxController::ContentViewController::didBecomeFirstResponder() { bool VariableBoxController::ContentViewController::handleEvent(Ion::Events::Event event) { if (event == Ion::Events::Back) { - /* TODO: implement matrix and list contexts */ - if (m_currentPage == Page::Scalar) {//if (m_currentPage == Page::RootMenu) { +#if MATRIX_LIST_VARIABLES + if (m_currentPage == Page::RootMenu) { +#else + if (m_currentPage == Page::Scalar) { +#endif m_firstSelectedRow = 0; app()->dismissModalViewController(); return true; @@ -125,6 +128,7 @@ void VariableBoxController::ContentViewController::willDisplayCellForIndex(Highl } myCell->displayExpression(true); if (expression) { + /* TODO: implement matrix and list contexts */ //myCell->setExpression(expression->createLayout()); // TODO: display the dimensgion of the list/matrice as subtitle /* char buffer[4]; @@ -228,8 +232,11 @@ void VariableBoxController::ContentViewController::reloadData() { } void VariableBoxController::ContentViewController::resetPage() { - /* TODO: implement matrix and list contexts */ - m_currentPage = Page::Scalar;//Page::RootMenu; +#if MATRIX_LIST_VARIABLES + m_currentPage = Page::RootMenu; +#else + m_currentPage = Page::Scalar; +#endif } void VariableBoxController::ContentViewController::deselectTable() {