mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-23 15:50:49 +01:00
[apps] Graph/Sequence: the function selected by the cursor has to be
save in the Snapshot to avoid weird selection when rebulding the app
This commit is contained in:
committed by
EmilieNumworks
parent
c9b86d0c86
commit
95f0efaf9f
@@ -13,7 +13,7 @@ namespace Shared {
|
||||
|
||||
class FunctionGraphController : public InteractiveCurveViewController, public InteractiveCurveViewRangeDelegate, public FunctionBannerDelegate {
|
||||
public:
|
||||
FunctionGraphController(Responder * parentResponder, ButtonRowController * header, InteractiveCurveViewRange * interactiveRange, CurveView * curveView, CurveViewCursor * cursor, uint32_t * modelVersion, uint32_t * rangeVersion, Poincare::Expression::AngleUnit * angleUnitVersion);
|
||||
FunctionGraphController(Responder * parentResponder, ButtonRowController * header, InteractiveCurveViewRange * interactiveRange, CurveView * curveView, CurveViewCursor * cursor, int * indexFunctionSelectedByCursor, uint32_t * modelVersion, uint32_t * rangeVersion, Poincare::Expression::AngleUnit * angleUnitVersion);
|
||||
bool isEmpty() const override;
|
||||
ViewController * initialisationParameterController() override;
|
||||
void viewWillAppear() override;
|
||||
@@ -22,7 +22,10 @@ protected:
|
||||
constexpr static float k_cursorBottomMarginRatio = 0.15f; // (cursorHeight/2+bannerHeigh)/graphViewHeight
|
||||
void reloadBannerView() override;
|
||||
bool handleEnter() override;
|
||||
int m_indexFunctionSelectedByCursor;
|
||||
int indexFunctionSelectedByCursor() const {
|
||||
return *m_indexFunctionSelectedByCursor;
|
||||
}
|
||||
virtual void selectFunctionWithCursor(int functionIndex);
|
||||
private:
|
||||
/* When y auto is ticked, we use a display margin to be ensure that the user
|
||||
* can move the cursor along the curve without panning the window */
|
||||
@@ -43,6 +46,7 @@ private:
|
||||
virtual FunctionCurveParameterController * curveParameterController() = 0;
|
||||
InitialisationParameterController m_initialisationParameterController;
|
||||
Poincare::Expression::AngleUnit * m_angleUnitVersion;
|
||||
int * m_indexFunctionSelectedByCursor;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user