If the user opens the Navigate menu, then closes it immediately, the
Auto status is not turned off.
Change-Id: I2d1ca0cfdae1b9c957dede7bf9f3c2890dea1bb0
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
The normalized status would not be refreshed after a call to setDefault
triggered by InteractiveCurveViewController::viewWillAppear.
Change-Id: I923ef3ca0585dbcc1f32b992d7dd1f4a3a206532
The Auto mode for curve ranges must be deactivated when moving the
cursor outside the screen and when activating navigation (formerly
Zoom).
Change-Id: I281a1d069c2ebcc30e7ead469c4f48438054d7c2
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
Fix a bug preventing the cursor from moving to other curves using UP and
DOWN when the y value was undef.
To reproduce :
- In Graph, define f(x) = 1 and g(x) = ln(x), then draw the curves
- Press DOWN to select g
- Press LEFT until g is not defined anymore
--> Pressing UP or DOWN won't allow you to select f
Change-Id: I79ed4a57b78ac0b8dac3f66e722e358bd4be18d9
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
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
At the moment ViewController::viewWillAppear doesn't do anything, so
there is no real impact. But if we want to use it it needs to be called
from subclasses.
If nextFirstResponder is nullptr, it means we are exiting the app, so
there is no need to relayout, reselect, ...
We did it bbefore because a long time ago, we used to keep all apps side
by side so they had to be thouroughly cleaned when exiting
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.
It was a pure virtual method implemented in derived classes
Shared::FunctionGraphController,
Regression::GraphController.
InteractiveCurveViewRange does not need anymore to hold CurveViewCursor
* m_cursor.
cursorBottomMarginRatio(), displayBottomMarginRatio(),
estimatedBannerHeight() and k_viewHeight moved to
Shared::InteractiveCurveViewController from derived classes.
estimatedBannerNumberOfLines() moved from
Shared::FunctionGraphController to
Shared::InteractiveCurveViewController and implemented in
Regresssion::GraphController.