From 3653f5f3bf1b6223939053a03ead29d9e9019919 Mon Sep 17 00:00:00 2001 From: Leland Lucius Date: Tue, 14 Apr 2020 11:37:57 -0500 Subject: [PATCH] Bug 1807 - NyquistPrompt Scripting command is not functional Try #3, but I'm pretty sure this is the one. :-) --- src/effects/nyquist/Nyquist.cpp | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/effects/nyquist/Nyquist.cpp b/src/effects/nyquist/Nyquist.cpp index ab72dc3f9..8c2e51bc6 100644 --- a/src/effects/nyquist/Nyquist.cpp +++ b/src/effects/nyquist/Nyquist.cpp @@ -309,9 +309,6 @@ bool NyquistEffect::DefineParams( ShuttleParams & S ) auto pSa = dynamic_cast(&S); if( pSa ){ SetAutomationParameters( *(pSa->mpEap) ); - if (pSa->bWrite && !mInputCmd.empty()) { - ParseCommand(mInputCmd); - } return true; } auto pSd = dynamic_cast(&S); @@ -369,8 +366,11 @@ bool NyquistEffect::DefineParams( ShuttleParams & S ) bool NyquistEffect::GetAutomationParameters(CommandParameters & parms) { - if (mExternal) + if (IsBatchProcessing()) { + parms.Write(KEY_Command, mInputCmd); + parms.Write(KEY_Version, mVersion); + return true; } @@ -423,8 +423,18 @@ bool NyquistEffect::GetAutomationParameters(CommandParameters & parms) bool NyquistEffect::SetAutomationParameters(CommandParameters & parms) { - if (mExternal) + if (IsBatchProcessing()) { + parms.Read(KEY_Command, &mInputCmd, wxEmptyString); + parms.Read(KEY_Version, &mVersion, mVersion); + + if (!mInputCmd.empty()) { + ParseCommand(mInputCmd); + } + mPromptType = mType; + mIsTool = (GetType() == EffectTypeTool); + mExternal = true; + return true; } @@ -433,6 +443,14 @@ bool NyquistEffect::SetAutomationParameters(CommandParameters & parms) parms.Read(KEY_Command, &mInputCmd, wxEmptyString); parms.Read(KEY_Version, &mVersion, mVersion); + if (!mInputCmd.empty()) { + ParseCommand(mInputCmd); + } + mType = EffectTypeTool; + mPromptType = mType; + mIsTool = true; + mExternal = true; + return true; }