comparison layer/ImageLayer.cpp @ 1533:37df1530519d

Fix failure to apply new frame when pasting events
author Chris Cannam
date Wed, 09 Oct 2019 11:51:19 +0100
parents e540aa5d89cd
children e6362cf5ff1d
comparison
equal deleted inserted replaced
1532:14a162f6870f 1533:37df1530519d
793 to.addPoint(p.withReferenceFrame(alignToReference(v, p.getFrame()))); 793 to.addPoint(p.withReferenceFrame(alignToReference(v, p.getFrame())));
794 } 794 }
795 } 795 }
796 796
797 bool 797 bool
798 ImageLayer::paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t /* frameOffset */, bool /* interactive */) 798 ImageLayer::paste(LayerGeometryProvider *v, const Clipboard &from,
799 sv_frame_t /* frameOffset */, bool /* interactive */)
799 { 800 {
800 auto model = ModelById::getAs<ImageModel>(m_model); 801 auto model = ModelById::getAs<ImageModel>(m_model);
801 if (!model) return false; 802 if (!model) return false;
802 803
803 const EventVector &points = from.getPoints(); 804 const EventVector &points = from.getPoints();
840 } else { 841 } else {
841 frame = i->getFrame(); 842 frame = i->getFrame();
842 } 843 }
843 } 844 }
844 845
845 Event p = *i; 846 Event p = i->withFrame(frame);
847
846 Event newPoint = p; 848 Event newPoint = p;
847 849
848 //!!! inadequate 850 //!!! inadequate
849 851
850 if (!p.hasLabel()) { 852 if (!p.hasLabel()) {