comparison layer/TimeValueLayer.cpp @ 1432:5b9692768beb single-point

Further snap fixes
author Chris Cannam
date Wed, 20 Mar 2019 15:46:17 +0000
parents af824022bffd
children 9abddbd57667
comparison
equal deleted inserted replaced
1431:af824022bffd 1432:5b9692768beb
660 return Layer::snapToFeatureFrame(v, frame, resolution, snap); 660 return Layer::snapToFeatureFrame(v, frame, resolution, snap);
661 } 661 }
662 662
663 // SnapLeft / SnapRight: return frame of nearest feature in that 663 // SnapLeft / SnapRight: return frame of nearest feature in that
664 // direction no matter how far away 664 // direction no matter how far away
665 //
666 // SnapNearest: return frame of nearest feature in either
667 // direction no matter how far away - I'm fairly sure this is
668 // never actually used
669 // 665 //
670 // SnapNeighbouring: return frame of feature that would be used in 666 // SnapNeighbouring: return frame of feature that would be used in
671 // an editing operation, i.e. closest feature in either direction 667 // an editing operation, i.e. closest feature in either direction
672 // but only if it is "close enough" 668 // but only if it is "close enough"
673 669
701 { 697 {
702 if (!m_model) { 698 if (!m_model) {
703 return Layer::snapToSimilarFeature(v, frame, resolution, snap); 699 return Layer::snapToSimilarFeature(v, frame, resolution, snap);
704 } 700 }
705 701
702 // snap is only permitted to be SnapLeft or SnapRight here.
703
706 resolution = m_model->getResolution(); 704 resolution = m_model->getResolution();
707 705
708 Event ref; 706 Event ref;
709 Event e; 707 Event e;
710 float matchvalue; 708 float matchvalue;