From a0ec589e4792e9960f9c7e838e2ee1bb10a015cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Wed, 13 Dec 2017 17:52:08 +0100 Subject: [PATCH] [apps] Graph: all contexts parse x now so no need for a specific one in graph --- apps/graph/app.cpp | 8 -------- apps/graph/app.h | 6 ------ 2 files changed, 14 deletions(-) diff --git a/apps/graph/app.cpp b/apps/graph/app.cpp index 55ec6262c..581877d5f 100644 --- a/apps/graph/app.cpp +++ b/apps/graph/app.cpp @@ -57,7 +57,6 @@ void App::Snapshot::tidy() { App::App(Container * container, Snapshot * snapshot) : FunctionApp(container, snapshot, &m_inputViewController), - m_xContext('x',((AppsContainer *)container)->globalContext()), m_listController(&m_listFooter, snapshot->functionStore(), &m_listHeader, &m_listFooter), m_listFooter(&m_listHeader, &m_listController, &m_listController, ButtonRowController::Position::Bottom, ButtonRowController::Style::EmbossedGrey), m_listHeader(&m_listStackViewController, &m_listFooter, &m_listController), @@ -79,13 +78,6 @@ InputViewController * App::inputViewController() { return &m_inputViewController; } -Context * App::localContext() { - if (m_tabViewController.activeTab() == 0) { - return &m_xContext; - } - return TextFieldDelegateApp::localContext(); -} - const char * App::XNT() { return "x"; } diff --git a/apps/graph/app.h b/apps/graph/app.h index 5ac2f36ff..328579cf7 100644 --- a/apps/graph/app.h +++ b/apps/graph/app.h @@ -33,15 +33,9 @@ public: Shared::InteractiveCurveViewRange m_graphRange; }; InputViewController * inputViewController() override; - /* This local context can parse x. However, it always stores NAN - * as x value. When we need to evaluate expression with a specific x value, we - * use a temporary local context (on the stack). That way, we avoid keeping - * weird x values after drawing curves or displaying the value table. */ - Poincare::Context * localContext() override; const char * XNT() override; private: App(Container * container, Snapshot * snapshot); - Poincare::VariableContext m_xContext; ListController m_listController; ButtonRowController m_listFooter; ButtonRowController m_listHeader;