From f017ac014d5e800bbda7c6853ff3c74cb2f52695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Mon, 2 Sep 2019 14:08:20 +0200 Subject: [PATCH] [apps/graph] GraphController: when moving cursor vertically (on non cartesian functions), going down increases the function index (to mimic their vertical order in the function list) --- apps/graph/graph/graph_controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/graph/graph/graph_controller.cpp b/apps/graph/graph/graph_controller.cpp index 97200fa0c..0cae543c2 100644 --- a/apps/graph/graph/graph_controller.cpp +++ b/apps/graph/graph/graph_controller.cpp @@ -71,7 +71,7 @@ int GraphController::closestCurveIndexVertically(bool goingUp, int currentSelect if (functionStore()->numberOfActiveFunctionsOfType(CartesianFunction::PlotType::Cartesian) == nbOfActiveFunctions) { return FunctionGraphController::closestCurveIndexVertically(goingUp, currentSelectedCurve, context); } - int nextActiveFunctionIndex = currentSelectedCurve + (goingUp ? 1 : -1); + int nextActiveFunctionIndex = currentSelectedCurve + (goingUp ? -1 : 1); return nextActiveFunctionIndex >= nbOfActiveFunctions ? -1 : nextActiveFunctionIndex; }