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