From 80c216cccf32cdc71c29db90264b4b0844352908 Mon Sep 17 00:00:00 2001 From: lllucius Date: Mon, 6 Oct 2014 21:53:58 +0000 Subject: [PATCH] Reset the selection time after a preview. Steve found that if you preview an effect and, say, cancel it before it finishes preparing, an apply will not modify all of the originally selected audio...just up to the preview length. This is very easy to reproduce using the Paulstretch on a 30 second clip...just click stop on the "Preparing preview" dialog and the click apply. --- src/effects/Effect.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/effects/Effect.cpp b/src/effects/Effect.cpp index 5c6bf0895..c25c433c7 100644 --- a/src/effects/Effect.cpp +++ b/src/effects/Effect.cpp @@ -487,11 +487,13 @@ void Effect::Preview(bool dryOnly) End(); Init(); } + + // Restore original selection + mT0 = t0save; + mT1 = t1save; + if (bSuccess) { - mT0 = t0save; - mT1 = t1save; - WaveTrackArray playbackTracks; WaveTrackArray recordingTracks; // Probably not the same tracks post-processing, so can't rely on previous values of mixLeft & mixRight.