changeset 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 aebee52e86b3
children 5a66f4e5a3dc e7a3fa8f4eec
files framework/MainWindowBase.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
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);
                 }
             }