From 7e6a601af0f92d115dce52ac354072f4cbff38ec Mon Sep 17 00:00:00 2001 From: Ruben Dashyan Date: Tue, 25 Feb 2020 13:59:18 +0100 Subject: [PATCH] [apps/regression/graph_controller] Inline selectRegressionCurve in moveCursorVertically In the graph controller, selectRegressionCurve is only called at one place (in moveCursorVertically). In general, setRoundCrossCursorView is called and *m_selectedDotIndex is updated. There is no reason at all to do things differently. Though selectRegressionCurve is called from GoToParameterController. --- apps/regression/graph_controller.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/regression/graph_controller.cpp b/apps/regression/graph_controller.cpp index dd1442568..fa11d95ff 100644 --- a/apps/regression/graph_controller.cpp +++ b/apps/regression/graph_controller.cpp @@ -321,7 +321,8 @@ bool GraphController::moveCursorVertically(int direction) { if (validRegression) { // Select the regression *m_selectedSeriesIndex = closestRegressionSeries; - selectRegressionCurve(); + *m_selectedDotIndex = -1; + setRoundCrossCursorView(true); m_cursor->moveTo(x, x, yValue(*m_selectedSeriesIndex, x, context)); return true; }