1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-25 08:38:39 +02:00

Preview button of Noise Reduction always disabled when editing macro...

... as was intended but not properly implemented
This commit is contained in:
Paul Licameli 2020-03-03 12:47:34 -05:00
parent 11748750fb
commit b8fd99692d
2 changed files with 5 additions and 7 deletions

View File

@ -474,10 +474,9 @@ bool EffectNoiseReduction::ShowInterface(
// Doesn't use the factory but substitutes its own dialog // Doesn't use the factory but substitutes its own dialog
// We may want to twiddle the levels if we are setting // We may want to twiddle the levels if we are setting
// from an automation dialog, the only case in which we can // from an automation dialog
// get here without any wavetracks.
return mSettings->PromptUser(this, parent, return mSettings->PromptUser(this, parent,
bool(mStatistics), (GetNumWaveTracks() == 0)); bool(mStatistics), forceModal);
} }
bool EffectNoiseReduction::Settings::PromptUser bool EffectNoiseReduction::Settings::PromptUser

View File

@ -157,7 +157,7 @@ bool EffectNoiseRemoval::CheckWhetherSkipEffect()
} }
bool EffectNoiseRemoval::ShowInterface( bool EffectNoiseRemoval::ShowInterface(
wxWindow &parent, const EffectDialogFactory &, bool forceModal /* forceModal */ ) wxWindow &parent, const EffectDialogFactory &, bool forceModal )
{ {
// to do: use forceModal correctly // to do: use forceModal correctly
NoiseRemovalDialog dlog(this, &parent); NoiseRemovalDialog dlog(this, &parent);
@ -170,9 +170,8 @@ bool EffectNoiseRemoval::ShowInterface(
dlog.mKeepNoise->SetValue(mbLeaveNoise); dlog.mKeepNoise->SetValue(mbLeaveNoise);
// We may want to twiddle the levels if we are setting // We may want to twiddle the levels if we are setting
// from an automation dialog, the only case in which we can // from an automation dialog
// get here without any wavetracks. bool bAllowTwiddleSettings = forceModal;
bool bAllowTwiddleSettings = (GetNumWaveTracks() == 0);
if (mHasProfile || bAllowTwiddleSettings) { if (mHasProfile || bAllowTwiddleSettings) {
dlog.m_pButton_Preview->Enable(GetNumWaveTracks() != 0); dlog.m_pButton_Preview->Enable(GetNumWaveTracks() != 0);