[apps/graph] When changing the window manually, do not pan to cursor

This commit is contained in:
Léa Saviot
2018-12-04 09:40:07 +01:00
parent 531b555949
commit 37ac12b1da
2 changed files with 8 additions and 6 deletions

View File

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