[apps/graph] Implement defaultCursorT for FunctionGraphController

This commit is contained in:
Émilie Feral
2019-09-02 15:28:54 +02:00
parent f017ac014d
commit a7285ba1ca
6 changed files with 19 additions and 8 deletions

View File

@@ -75,4 +75,12 @@ int GraphController::closestCurveIndexVertically(bool goingUp, int currentSelect
return nextActiveFunctionIndex >= nbOfActiveFunctions ? -1 : nextActiveFunctionIndex;
}
double GraphController::defaultCursorT(Ion::Storage::Record record) {
ExpiringPointer<CartesianFunction> function = functionStore()->modelForRecord(record);
if (function->plotType() == CartesianFunction::PlotType::Cartesian) {
return FunctionGraphController::defaultCursorT(record);
}
return function->tMin();
}
}