mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[poincare/zoom] Remove tuneXRange argument
The ability to perform a range search without changing the X range was only there to accomodate the Yauto feature. Change-Id: I8c2b61b447fbd3dc1f4e303dff06d1a8d6e7a4f2
This commit is contained in:
committed by
Émilie Feral
parent
07c52139b9
commit
ad6edffc07
@@ -137,20 +137,16 @@ int FunctionGraphController::numberOfCurves() const {
|
||||
}
|
||||
|
||||
void FunctionGraphController::interestingRanges(InteractiveCurveViewRange * range) const {
|
||||
privateComputeRanges(true, range);
|
||||
}
|
||||
|
||||
void FunctionGraphController::privateComputeRanges(bool tuneXRange, InteractiveCurveViewRange * range) const {
|
||||
Poincare::Context * context = textFieldDelegateApp()->localContext();
|
||||
float resultXMin = tuneXRange ? FLT_MAX : range->xMin();
|
||||
float resultXMax = tuneXRange ? -FLT_MAX : range->xMax();
|
||||
float resultXMin = FLT_MAX;
|
||||
float resultXMax = -FLT_MAX;
|
||||
float resultYMin = FLT_MAX;
|
||||
float resultYMax = -FLT_MAX;
|
||||
assert(functionStore()->numberOfActiveFunctions() > 0);
|
||||
int functionsCount = functionStore()->numberOfActiveFunctions();
|
||||
for (int i = 0; i < functionsCount; i++) {
|
||||
ExpiringPointer<Function> f = functionStore()->modelForRecord(functionStore()->activeRecordAtIndex(i));
|
||||
f->rangeForDisplay(&resultXMin, &resultXMax, &resultYMin, &resultYMax, context, tuneXRange);
|
||||
f->rangeForDisplay(&resultXMin, &resultXMax, &resultYMin, &resultYMax, context);
|
||||
}
|
||||
|
||||
range->setXMin(resultXMin);
|
||||
|
||||
Reference in New Issue
Block a user