Fix pasting of envelope from expanded cutline

This commit is contained in:
Paul Licameli 2017-06-26 10:23:34 -04:00
parent d6e09e142f
commit 44a081c7a0
1 changed files with 5 additions and 0 deletions

View File

@ -1806,6 +1806,11 @@ void WaveClip::ExpandCutLine(double cutLinePosition)
if ( it != end ) {
auto cutline = it->get();
// assume STRONG-GUARANTEE from Paste
// Envelope::Paste takes offset into account, WaveClip::Paste doesn't!
// Do this to get the right result:
cutline->mEnvelope->SetOffset(0);
Paste(mOffset+cutline->GetOffset(), cutline);
// Now erase the cutline,
// but be careful to find it again, because Paste above may