From d78033887f2b3c32c569e87fbfb6b20c6459a119 Mon Sep 17 00:00:00 2001 From: Steve Daulton Date: Tue, 26 Sep 2017 12:34:44 +0100 Subject: [PATCH] Fix initialization of Debug and Preview buttons --- src/effects/nyquist/Nyquist.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/effects/nyquist/Nyquist.cpp b/src/effects/nyquist/Nyquist.cpp index 6124e769c..b0a4562ce 100644 --- a/src/effects/nyquist/Nyquist.cpp +++ b/src/effects/nyquist/Nyquist.cpp @@ -137,8 +137,6 @@ NyquistEffect::NyquistEffect(const wxString &fName) mRestoreSplits = true; // Default: Restore split lines. mMergeClips = -1; // Default (auto): Merge if length remains unchanged. - mDebugButton = true; // Debug button enabled by default. - mVersion = 4; mStop = false; @@ -427,7 +425,8 @@ bool NyquistEffect::Init() if (mIsPrompt) { mType = EffectTypeProcess; mName = XO("Nyquist Prompt"); - mDebugButton = true; // Debug button always enabled for Nyquist Prompt. + mDebugButton = true; // Debug button always enabled for Nyquist Prompt. + mEnablePreview = true; // Preview button always enabled for Nyquist Prompt. } // As of Audacity 2.1.2 rc1, 'spectral' effects are allowed only if @@ -1814,6 +1813,8 @@ bool NyquistEffect::ParseProgram(wxInputStream & stream) mHelpFileExists = false; mDebug = false; mTrace = false; + mDebugButton = true; // Debug button enabled by default. + mEnablePreview = true; // Preview button enabled by default. mFoundType = false; while (!stream.Eof() && stream.IsOk()) @@ -1865,8 +1866,6 @@ void NyquistEffect::ParseFile() bool NyquistEffect::ParseCommand(const wxString & cmd) { - mEnablePreview = true; - wxStringInputStream stream(cmd + wxT(" ")); return ParseProgram(stream);