Mercurial > hg > svgui
diff layer/TimeValueLayer.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 | a2fbcfeb2572 |
children | 4f8c72adbf43 |
line wrap: on
line diff
--- a/layer/TimeValueLayer.cpp Wed Oct 09 11:33:33 2019 +0100 +++ b/layer/TimeValueLayer.cpp Wed Oct 09 11:51:19 2019 +0100 @@ -1686,8 +1686,8 @@ } bool -TimeValueLayer::paste(LayerGeometryProvider *v, const Clipboard &from, sv_frame_t /* frameOffset */, - bool interactive) +TimeValueLayer::paste(LayerGeometryProvider *v, const Clipboard &from, + sv_frame_t /* frameOffset */, bool interactive) { auto model = ModelById::getAs<SparseTimeValueModel>(m_model); if (!model) return false; @@ -1842,7 +1842,8 @@ } } - Event newPoint = *i; + Event newPoint = i->withFrame(frame); + if (!i->hasLabel() && i->hasValue()) { newPoint = newPoint.withLabel(QString("%1").arg(i->getValue())); }