diff framework/MainWindowBase.cpp @ 352:1d8cb0d92f4b

Fix erroneous addition of extra point at time zero when first tapping a point with a time-difference based label scheme
author Chris Cannam
date Fri, 23 May 2014 11:29:17 +0100
parents b3609adae921
children 4969e7921931
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp	Wed May 14 09:54:46 2014 +0100
+++ b/framework/MainWindowBase.cpp	Fri May 23 11:29:17 2014 +0100
@@ -925,14 +925,14 @@
 
                 m_labeller->setSampleRate(sodm->getSampleRate());
 
-                if (m_labeller->actingOnPrevPoint()) {
+                if (m_labeller->actingOnPrevPoint() && havePrevPoint) {
                     command->deletePoint(prevPoint);
                 }
 
                 m_labeller->label<SparseOneDimensionalModel::Point>
                     (point, havePrevPoint ? &prevPoint : 0);
 
-                if (m_labeller->actingOnPrevPoint()) {
+                if (m_labeller->actingOnPrevPoint() && havePrevPoint) {
                     command->addPoint(prevPoint);
                 }
             }