From 63424fb98be929100bad613f2ec4ef1bbd19f0c6 Mon Sep 17 00:00:00 2001 From: Ruben Dashyan Date: Fri, 31 Jan 2020 15:50:35 +0100 Subject: [PATCH] [apps/*/function_graph_controller] Factor selectFunctionWithCursor --- apps/graph/graph/graph_controller.cpp | 1 - apps/shared/function_graph_controller.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/graph/graph/graph_controller.cpp b/apps/graph/graph/graph_controller.cpp index 9f45f3eff..ef17e9a32 100644 --- a/apps/graph/graph/graph_controller.cpp +++ b/apps/graph/graph/graph_controller.cpp @@ -36,7 +36,6 @@ void GraphController::viewWillAppear() { #endif m_view.setCursorView(&m_cursorView); FunctionGraphController::viewWillAppear(); - selectFunctionWithCursor(indexFunctionSelectedByCursor()); } bool GraphController::defautRangeIsNormalized() const { diff --git a/apps/shared/function_graph_controller.cpp b/apps/shared/function_graph_controller.cpp index 6606ca059..cf70f677d 100644 --- a/apps/shared/function_graph_controller.cpp +++ b/apps/shared/function_graph_controller.cpp @@ -149,10 +149,10 @@ void FunctionGraphController::initCursorParameters() { functionIndex = 0; } m_cursor->moveTo(t, xy.x1(), xy.x2()); - selectFunctionWithCursor(functionIndex); if (interactiveCurveViewRange()->yAuto()) { interactiveCurveViewRange()->panToMakePointVisible(xy.x1(), xy.x2(), cursorTopMarginRatio(), k_cursorRightMarginRatio, cursorBottomMarginRatio(), k_cursorLeftMarginRatio); } + selectFunctionWithCursor(functionIndex); } bool FunctionGraphController::moveCursorVertically(int direction) {