[apps/graph][apps/sequence] In values controller, memoize the number of

columns to improve performance

Change-Id: Ie3c545d0198a2f23575bd22fdbf56e9c6b8ff2b8
This commit is contained in:
Émilie Feral
2017-06-01 13:19:51 +02:00
parent 25383b73e5
commit d2c55eb7d0
14 changed files with 67 additions and 39 deletions

View File

@@ -8,7 +8,8 @@ namespace Shared {
FunctionApp::Snapshot::Snapshot() :
m_cursor(),
m_interval(),
m_modelVersion(0),
m_graphModelVersion(0),
m_valuesModelVersion(0),
m_rangeVersion(0)
{
m_interval.setStart(0);
@@ -20,8 +21,12 @@ CurveViewCursor * FunctionApp::Snapshot::cursor() {
return &m_cursor;
}
uint32_t * FunctionApp::Snapshot::modelVersion() {
return &m_modelVersion;
uint32_t * FunctionApp::Snapshot::graphModelVersion() {
return &m_graphModelVersion;
}
uint32_t * FunctionApp::Snapshot::valuesModelVersion() {
return &m_valuesModelVersion;
}
uint32_t * FunctionApp::Snapshot::rangeVersion() {
@@ -36,7 +41,8 @@ void FunctionApp::Snapshot::reset() {
m_interval.setStart(0);
m_interval.setEnd(10);
m_interval.setStep(1);
m_modelVersion = 0;
m_graphModelVersion = 0;
m_valuesModelVersion = 0;
m_rangeVersion = 0;
setActiveTab(0);
}