[apps/range_parameter_controller] Remove YAuto

This allows for a great deal of simplifications in the class
RangeParamterController.

Change-Id: I5de55d4e8e1f598eb13b08fb8f042907f55b2fa8
This commit is contained in:
Gabriel Ozouf
2020-10-02 10:53:37 +02:00
committed by Émilie Feral
parent 5a07db3452
commit 1a5661fd4c
11 changed files with 22 additions and 161 deletions

View File

@@ -93,9 +93,6 @@ void FunctionGraphController::initCursorParameters() {
functionIndex = 0;
}
m_cursor->moveTo(t, xy.x1(), xy.x2());
if (interactiveCurveViewRange()->yAuto()) {
interactiveCurveViewRange()->panToMakePointVisible(xy.x1(), xy.x2(), cursorTopMarginRatio(), cursorRightMarginRatio(), cursorBottomMarginRatio(), cursorLeftMarginRatio(), curveView()->pixelWidth());
}
selectFunctionWithCursor(functionIndex);
}
@@ -153,7 +150,6 @@ void FunctionGraphController::interestingRanges(InteractiveCurveViewRange * rang
Shared::InteractiveCurveViewRangeDelegate::Range FunctionGraphController::computeYRange(Shared::InteractiveCurveViewRange * interactiveCurveViewRange) {
InteractiveCurveViewRange tempRange = *interactiveCurveViewRange;
tempRange.setYAuto(false);
privateComputeRanges(false, &tempRange);
return Shared::InteractiveCurveViewRangeDelegate::Range{.min = tempRange.yMin(), .max = tempRange.yMax()};
}