[apps/Seq/Reg] Do not pan to cursor if no yAuto

This commit is contained in:
Léa Saviot
2018-12-04 10:26:05 +01:00
parent 18381fd334
commit 058b49a063
2 changed files with 6 additions and 2 deletions

View File

@@ -119,7 +119,9 @@ void FunctionGraphController::initCursorParameters() {
m_cursor->moveTo(x, y);
functionIndex = (std::isnan(y) || std::isinf(y)) ? 0 : functionIndex - 1;
selectFunctionWithCursor(functionIndex);
interactiveCurveViewRange()->panToMakePointVisible(x, y, k_displayTopMarginRatio, k_cursorRightMarginRatio, k_displayBottomMarginRatio, k_cursorLeftMarginRatio);
if (interactiveCurveViewRange()->yAuto()) {
interactiveCurveViewRange()->panToMakePointVisible(x, y, k_displayTopMarginRatio, k_cursorRightMarginRatio, k_displayBottomMarginRatio, k_cursorLeftMarginRatio);
}
}
bool FunctionGraphController::moveCursorVertically(int direction) {