1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-24 16:20:05 +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
// 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

View File

@ -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);