mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-28 18:20:14 +01:00
[apps/graph/graph] initialize the graph view context when the graph controller is
the first responder Change-Id: I12c7b2c28e750cd49ef59de59c659a349dd0a346
This commit is contained in:
@@ -33,10 +33,6 @@ GraphController::GraphController(Responder * parentResponder, FunctionStore * fu
|
||||
}
|
||||
|
||||
View * GraphController::view() {
|
||||
if (m_view.context() == nullptr) {
|
||||
App * graphApp = (Graph::App *)app();
|
||||
m_view.setContext(graphApp->evaluateContext());
|
||||
}
|
||||
return &m_view;
|
||||
}
|
||||
|
||||
@@ -101,6 +97,10 @@ Button * GraphController::buttonAtIndex(int index) {
|
||||
}
|
||||
|
||||
void GraphController::didBecomeFirstResponder() {
|
||||
if (m_view.context() == nullptr) {
|
||||
App * graphApp = (Graph::App *)app();
|
||||
m_view.setContext(graphApp->evaluateContext());
|
||||
}
|
||||
if (m_axisInterval.context() == nullptr) {
|
||||
App * graphApp = (Graph::App *)app();
|
||||
m_axisInterval.setContext(graphApp->evaluateContext());
|
||||
|
||||
Reference in New Issue
Block a user