[apps/graph_ctrlr] Reload range if no previous model is present

We memoize the checksum of the x first models, and we check that one of
these models is still present when the graph view appears. If so, we do
not reload the range, other wise we reload it.

Scenario:
f(t) = [t^2  t+1] in parametric
Display the graph
f(x) = 1 on ]-inf;0]
g(x) = 2 on [0;inf[
Display the graph -> the range did not change
This commit is contained in:
Léa Saviot
2020-03-04 14:41:18 +01:00
committed by RubenNumworks
parent aab8974934
commit 53705fb333
13 changed files with 70 additions and 7 deletions

View File

@@ -183,6 +183,10 @@ uint32_t FunctionGraphController::modelVersion() {
return functionStore()->storeChecksum();
}
uint32_t FunctionGraphController::modelVersionAtIndex(size_t i) {
return functionStore()->storeChecksumAtIndex(i);
}
uint32_t FunctionGraphController::rangeVersion() {
return interactiveCurveViewRange()->rangeChecksum();
}