[apps] Graph: all contexts parse x now so no need for a specific one in

graph
This commit is contained in:
Émilie Feral
2017-12-13 17:52:08 +01:00
committed by Ecco
parent 1a80dcf1be
commit a0ec589e47
2 changed files with 0 additions and 14 deletions

View File

@@ -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";
}

View File

@@ -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<float> m_xContext;
ListController m_listController;
ButtonRowController m_listFooter;
ButtonRowController m_listHeader;