[apps/graph/values] Display only active function in value table

Change-Id: I4e976858a2c4703ad4bc9dadda5059bcc1c994ba
This commit is contained in:
Émilie Feral
2017-02-24 16:50:59 +01:00
parent 7acac8cec7
commit 4596602080
2 changed files with 3 additions and 5 deletions

View File

@@ -1,7 +1,6 @@
#include "values_controller.h"
#include <assert.h>
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;