From 44a081c7a0d02dda0d3239b024c41a3d8b1fc220 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Mon, 26 Jun 2017 10:23:34 -0400 Subject: [PATCH] Fix pasting of envelope from expanded cutline --- src/WaveClip.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/WaveClip.cpp b/src/WaveClip.cpp index 74afefb01..ed4803b82 100644 --- a/src/WaveClip.cpp +++ b/src/WaveClip.cpp @@ -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