[apps/regression] In graph, make selected dot persistent in snapshot

Change-Id: I0d1ca7bd45678861c946b2c1e6d580b9537089e2
This commit is contained in:
Émilie Feral
2017-06-12 16:38:50 +02:00
parent 25aee1c2b2
commit 37fc0ab60a
4 changed files with 29 additions and 22 deletions

View File

@@ -21,6 +21,7 @@ const Image * App::Descriptor::icon() {
App::Snapshot::Snapshot() :
m_store(),
m_cursor(),
m_graphSelectedDotIndex(-1),
m_modelVersion(0),
m_rangeVersion(0)
{
@@ -51,6 +52,10 @@ CurveViewCursor * App::Snapshot::cursor() {
return &m_cursor;
}
int * App::Snapshot::graphSelectedDotIndex() {
return &m_graphSelectedDotIndex;
}
uint32_t * App::Snapshot::modelVersion() {
return &m_modelVersion;
}
@@ -64,7 +69,7 @@ App::App(Container * container, Snapshot * snapshot) :
m_calculationController(&m_calculationAlternateEmptyViewController, &m_calculationHeader, snapshot->store()),
m_calculationAlternateEmptyViewController(&m_calculationHeader, &m_calculationController, &m_calculationController),
m_calculationHeader(&m_tabViewController, &m_calculationAlternateEmptyViewController, &m_calculationController),
m_graphController(&m_graphAlternateEmptyViewController, &m_graphHeader, snapshot->store(), snapshot->cursor(), snapshot->modelVersion(), snapshot->rangeVersion()),
m_graphController(&m_graphAlternateEmptyViewController, &m_graphHeader, snapshot->store(), snapshot->cursor(), snapshot->modelVersion(), snapshot->rangeVersion(), snapshot->graphSelectedDotIndex()),
m_graphAlternateEmptyViewController(&m_graphHeader, &m_graphController, &m_graphController),
m_graphHeader(&m_graphStackViewController, &m_graphAlternateEmptyViewController, &m_graphController),
m_graphStackViewController(&m_tabViewController, &m_graphHeader),