aboutsummaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2016-02-12 18:01:27 -0200
committerSamuel Fadel <samuelfadel@gmail.com>2016-02-12 18:04:03 -0200
commit95a77b04a6855b26d340aaca5e3030a7d1a7cb3c (patch)
tree7f636d927f7d31f0972496387325332a098e529d /main.cpp
parent7a07231716f04ee98091a946e122056e1fa69686 (diff)
Many bugfixes related to ProjectionObserver.
* Correct handling of relative metrics in UI * undo(), reset() methods added * Main class responsible for undoing and resetting both history and the observer (MUST BE AT THE SAME TIME! -- this might indicate a design issue to be addressed in the future)
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/main.cpp b/main.cpp
index 6eed197..a5aaf68 100644
--- a/main.cpp
+++ b/main.cpp
@@ -247,14 +247,10 @@ int main(int argc, char **argv)
m->rpBarChart, &BarChart::brushItem);
// Recompute values whenever projection changes
- ProjectionObserver projectionObserver(X, cpIndices, m->projectionHistory);
+ ProjectionObserver projectionObserver(X, cpIndices);
m->projectionObserver = &projectionObserver;
QObject::connect(m->projectionHistory, &ProjectionHistory::mapAdded,
- m->projectionObserver, &ProjectionObserver::setMap);
- QObject::connect(m->projectionHistory, &ProjectionHistory::undoPerformed,
- m->projectionObserver, &ProjectionObserver::setMap);
- QObject::connect(m->projectionHistory, &ProjectionHistory::resetPerformed,
- m->projectionObserver, &ProjectionObserver::setMap);
+ m->projectionObserver, &ProjectionObserver::addMap);
QObject::connect(m->projectionObserver, &ProjectionObserver::cpValuesChanged,
m->cpPlot, &Scatterplot::setColorData);
QObject::connect(m->projectionObserver, &ProjectionObserver::rpValuesChanged,