comparison 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
comparison
equal deleted inserted replaced
350:aebee52e86b3 352:1d8cb0d92f4b
923 923
924 if (m_labeller) { 924 if (m_labeller) {
925 925
926 m_labeller->setSampleRate(sodm->getSampleRate()); 926 m_labeller->setSampleRate(sodm->getSampleRate());
927 927
928 if (m_labeller->actingOnPrevPoint()) { 928 if (m_labeller->actingOnPrevPoint() && havePrevPoint) {
929 command->deletePoint(prevPoint); 929 command->deletePoint(prevPoint);
930 } 930 }
931 931
932 m_labeller->label<SparseOneDimensionalModel::Point> 932 m_labeller->label<SparseOneDimensionalModel::Point>
933 (point, havePrevPoint ? &prevPoint : 0); 933 (point, havePrevPoint ? &prevPoint : 0);
934 934
935 if (m_labeller->actingOnPrevPoint()) { 935 if (m_labeller->actingOnPrevPoint() && havePrevPoint) {
936 command->addPoint(prevPoint); 936 command->addPoint(prevPoint);
937 } 937 }
938 } 938 }
939 939
940 command->addPoint(point); 940 command->addPoint(point);