mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[apps/continuous_function_cache] Clear on bad step
Cache did not check that the step was the same before panning, causing old values to remains cached. e.g. : - Type f(x) = x, and plot it. - Go to Axes, and set Xmax = 0. - Confirm Change-Id: Ie8ed10c336cf517a65f19b05bd14866daf8128c2
This commit is contained in:
committed by
Émilie Feral
parent
3f19d66c78
commit
bd068312d9
@@ -31,6 +31,10 @@ void ContinuousFunctionCache::PrepareForCaching(void * fun, ContinuousFunctionCa
|
||||
function->setCache(cache);
|
||||
}
|
||||
|
||||
if (tStep != 0. && tStep != cache->step()) {
|
||||
cache->clear();
|
||||
}
|
||||
|
||||
if (function->plotType() == ContinuousFunction::PlotType::Cartesian && tStep != 0) {
|
||||
function->cache()->pan(function, tMin);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user