[apps] Fix StorageFunctionGraphController::moveCursorVertically

This commit is contained in:
Léa Saviot
2018-11-15 17:16:14 +01:00
committed by Émilie Feral
parent e9974a7e7a
commit 3ccd1aabf4

View File

@@ -171,7 +171,6 @@ bool StorageFunctionGraphController::moveCursorVertically(int direction) {
}
}
if (isNextFunction) {
selectFunctionWithCursor(i);
nextY = newY;
nextActiveFunctionIndex = i;
}
@@ -179,6 +178,7 @@ bool StorageFunctionGraphController::moveCursorVertically(int direction) {
if (nextActiveFunctionIndex < 0) {
return false;
}
selectFunctionWithCursor(nextActiveFunctionIndex);
m_cursor->moveTo(m_cursor->x(), nextY);
interactiveCurveViewRange()->panToMakePointVisible(m_cursor->x(), m_cursor->y(), cursorTopMarginRatio(), k_cursorRightMarginRatio, cursorBottomMarginRatio(), k_cursorLeftMarginRatio);
return true;