From df39a28c86c44ec676a24f7f42f79839ae597b1a Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Tue, 9 Feb 2016 22:56:12 -0200 Subject: ProjectionObserver: rewinding on values only if selections are empty. --- projectionobserver.cpp | 12 ++++++------ 1 file 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; } -- cgit v1.2.3