Restore the permanence of the cursor between accesses to the graph
window.
The cursor used to be reset when the models had been modified. As there
is no longer a system in place to track these modifications, we manually
check if there is a curve beneath the cursor before reseting it.
Change-Id: I6f71fc17744b5bf1ee552c82126bb4a08b823629
This method of InteractiveCurveViewRangeDelegate was only used to
compute the Y range when Yauto was on.
Change-Id: I9b688a87e16fc58c7d2b00eb071076b98f945df6
The graph range used to be reset to default whenever all functions were
modified. As we no longer want to reset the range without the user's
input, we do not need to track whether the functions changed at all.
/!\ As of this commit, there is no longer a way to restore the default
zoom, until a new automatic zoom button is added.
Change-Id: Ie74e8fd61e13055fa6ce2b2d1e883182d4ecffce
Method InteractiveCurveViewRange::panToMakePointVisible now moves the
range of a whole number of pixels when panning horizontally. This allows
the cache of cartesian functions not to be invalidated.
Change-Id: Idb9904fef134dd13458e1f2287b0fe5145e8aec7
This is unfortunately required in several cases:
- Sometimes when we use either float and double (this should be changed)
- Because KDCoordinate is not an int, so any arithmemtic promotes it to
an int
- Because we mix pointer differences and ints
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
selectRegressionCurve is only called from GoToParameterController and is
part of the GraphController's API for updating the model. It should not
update the view. viewWillAppear does.
In the graph controller, selectRegressionCurve is only called at one
place (in moveCursorVertically). In general, setRoundCrossCursorView is
called and *m_selectedDotIndex is updated. There is no reason at all to
do things differently.
Though selectRegressionCurve is called from GoToParameterController.
In order to avoid reloading after Ion::Events::Toolbox/Var, but only in
viewWillAppear.
The previous behavior was masking a bug in
Regression::GraphController::viewWillAppear where the cursor could be
moved after reloading the bannerView.