From 91503a91f1173b5541236561219a607ddd4ee4e5 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Mon, 2 Mar 2020 11:56:43 -0500 Subject: [PATCH] Amplify effect should correctly restore the saved can-clip setting... ... bug began at commit d98e41a When not batch processing, don't overwrite mCanClip --- src/effects/Amplify.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/effects/Amplify.cpp b/src/effects/Amplify.cpp index fe51942c7..de1dfad4f 100644 --- a/src/effects/Amplify.cpp +++ b/src/effects/Amplify.cpp @@ -215,8 +215,10 @@ void EffectAmplify::PopulateOrExchange(ShuttleGui & S) { enum{ precision = 3 }; // allow (a generous) 3 decimal places for Amplification (dB) - if (IsBatchProcessing()) + bool batch = IsBatchProcessing(); + if ( batch ) { + mCanClip = true; mPeak = 1.0; } else @@ -277,7 +279,8 @@ void EffectAmplify::PopulateOrExchange(ShuttleGui & S) // Clipping S.StartHorizontalLay(wxCENTER); { - mClip = S.Id(ID_Clip).Disable( mCanClip = IsBatchProcessing() ) + + mClip = S.Id(ID_Clip).Disable( batch ) .AddCheckBox(XO("Allow clipping"), false); } S.EndHorizontalLay();