diff options
author | Samuel Fadel <samuelfadel@gmail.com> | 2016-02-09 22:56:12 -0200 |
---|---|---|
committer | Samuel Fadel <samuelfadel@gmail.com> | 2016-02-09 22:56:12 -0200 |
commit | df39a28c86c44ec676a24f7f42f79839ae597b1a (patch) | |
tree | 90c13e17ff66151e701ee906cf16d9511c0b1281 | |
parent | 5c26dd04dd171112d14bfb24db96cf286566e19b (diff) |
ProjectionObserver: rewinding on values only if selections are empty.
-rw-r--r-- | projectionobserver.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/projectionobserver.cpp b/projectionobserver.cpp index bf73ded..bcdda57 100644 --- a/projectionobserver.cpp +++ b/projectionobserver.cpp @@ -49,11 +49,9 @@ void ProjectionObserver::computeAlphas() void ProjectionObserver::setMap(const arma::mat &Y) { // update previous map - if (m_Y.n_elem > 0) { - m_prevY = m_Y; - m_prevDistY = m_distY; - m_prevValues = m_values; - } + m_prevY = m_Y; + m_prevDistY = m_distY; + m_prevValues = m_values; m_Y = Y; m_distY = mp::dist(Y); @@ -169,7 +167,9 @@ bool ProjectionObserver::emitValuesChanged() const void ProjectionObserver::setRewind(double t) { - if (m_prevValues.n_elem != m_values.n_elem) { + if (m_prevValues.n_elem != m_values.n_elem + || !m_cpSelectionEmpty + || !m_rpSelectionEmpty) { return; } |