From 4596602080f7dc74ef99c9307394b975c0a8b4bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Fri, 24 Feb 2017 16:50:59 +0100 Subject: [PATCH] [apps/graph/values] Display only active function in value table Change-Id: I4e976858a2c4703ad4bc9dadda5059bcc1c994ba --- apps/graph/values/values_controller.cpp | 7 +++---- apps/graph/values/values_controller.h | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/graph/values/values_controller.cpp b/apps/graph/values/values_controller.cpp index a3642c74c..5ab83ba6c 100644 --- a/apps/graph/values/values_controller.cpp +++ b/apps/graph/values/values_controller.cpp @@ -1,7 +1,6 @@ #include "values_controller.h" #include -using namespace Poincare; using namespace Shared; namespace Graph { @@ -27,9 +26,9 @@ bool ValuesController::handleEvent(Ion::Events::Event event) { int ValuesController::numberOfColumns() { int result = 1; - for (int i = 0; i < m_functionStore->numberOfDefinedFunctions(); i++) { - if (m_functionStore->definedFunctionAtIndex(i)->isActive()) { - result += 1 + m_functionStore->definedFunctionAtIndex(i)->displayDerivative(); + for (int i = 0; i < m_functionStore->numberOfActiveFunctions(); i++) { + if (m_functionStore->activeFunctionAtIndex(i)->isActive()) { + result += 1 + m_functionStore->activeFunctionAtIndex(i)->displayDerivative(); } } return result; diff --git a/apps/graph/values/values_controller.h b/apps/graph/values/values_controller.h index d2c6b4805..ae410e8cf 100644 --- a/apps/graph/values/values_controller.h +++ b/apps/graph/values/values_controller.h @@ -1,7 +1,6 @@ #ifndef GRAPH_VALUES_CONTROLLER_H #define GRAPH_VALUES_CONTROLLER_H -#include #include "../cartesian_function_store.h" #include "../function_title_cell.h" #include "../../shared/values_controller.h"