From b8fd99692df62328229a521107444d2c707c0dc2 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Tue, 3 Mar 2020 12:47:34 -0500 Subject: [PATCH] Preview button of Noise Reduction always disabled when editing macro... ... as was intended but not properly implemented --- src/effects/NoiseReduction.cpp | 5 ++--- src/effects/NoiseRemoval.cpp | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/effects/NoiseReduction.cpp b/src/effects/NoiseReduction.cpp index afa67e677..4b2a3dd5a 100644 --- a/src/effects/NoiseReduction.cpp +++ b/src/effects/NoiseReduction.cpp @@ -474,10 +474,9 @@ bool EffectNoiseReduction::ShowInterface( // Doesn't use the factory but substitutes its own dialog // We may want to twiddle the levels if we are setting - // from an automation dialog, the only case in which we can - // get here without any wavetracks. + // from an automation dialog return mSettings->PromptUser(this, parent, - bool(mStatistics), (GetNumWaveTracks() == 0)); + bool(mStatistics), forceModal); } bool EffectNoiseReduction::Settings::PromptUser diff --git a/src/effects/NoiseRemoval.cpp b/src/effects/NoiseRemoval.cpp index 669ea25e8..253fcb3d7 100644 --- a/src/effects/NoiseRemoval.cpp +++ b/src/effects/NoiseRemoval.cpp @@ -157,7 +157,7 @@ bool EffectNoiseRemoval::CheckWhetherSkipEffect() } bool EffectNoiseRemoval::ShowInterface( - wxWindow &parent, const EffectDialogFactory &, bool forceModal /* forceModal */ ) + wxWindow &parent, const EffectDialogFactory &, bool forceModal ) { // to do: use forceModal correctly NoiseRemovalDialog dlog(this, &parent); @@ -170,9 +170,8 @@ bool EffectNoiseRemoval::ShowInterface( dlog.mKeepNoise->SetValue(mbLeaveNoise); // We may want to twiddle the levels if we are setting - // from an automation dialog, the only case in which we can - // get here without any wavetracks. - bool bAllowTwiddleSettings = (GetNumWaveTracks() == 0); + // from an automation dialog + bool bAllowTwiddleSettings = forceModal; if (mHasProfile || bAllowTwiddleSettings) { dlog.m_pButton_Preview->Enable(GetNumWaveTracks() != 0);