Mercurial > hg > svgui
diff layer/BoxLayer.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 | 14c07e445365 |
children | 873ff035364c |
line wrap: on
line diff
--- a/layer/BoxLayer.cpp Wed Oct 09 11:33:33 2019 +0100 +++ b/layer/BoxLayer.cpp Wed Oct 09 11:51:19 2019 +0100 @@ -1106,7 +1106,8 @@ } bool -BoxLayer::paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t /* frameOffset */, bool /* interactive */) +BoxLayer::paste(LayerGeometryProvider *v, const Clipboard &from, + sv_frame_t /* frameOffset */, bool /* interactive */) { auto model = ModelById::getAs<BoxModel>(m_model); if (!model) return false; @@ -1154,7 +1155,8 @@ } } - Event p = *i; + Event p = i->withFrame(frame); + Event newPoint = p; if (!p.hasValue()) { newPoint = newPoint.withValue((model->getValueMinimum() +