[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:
Émilie Feral
2018-01-25 13:39:11 +01:00
committed by EmilieNumworks
parent c9b86d0c86
commit 95f0efaf9f
10 changed files with 40 additions and 24 deletions

View File

@@ -8,6 +8,7 @@ namespace Shared {
FunctionApp::Snapshot::Snapshot() :
m_cursor(),
m_interval(),
m_indexFunctionSelectedByCursor(0),
m_modelVersion(0),
m_rangeVersion(0),
m_angleUnitVersion(Expression::AngleUnit::Radian)
@@ -37,10 +38,15 @@ Interval * FunctionApp::Snapshot::interval() {
return &m_interval;
}
int * FunctionApp::Snapshot::indexFunctionSelectedByCursor() {
return &m_indexFunctionSelectedByCursor;
}
void FunctionApp::Snapshot::reset() {
m_interval.setStart(0);
m_interval.setEnd(10);
m_interval.setStep(1);
m_indexFunctionSelectedByCursor = 0;
m_modelVersion = 0;
m_rangeVersion = 0;
setActiveTab(0);