From d841172abb9844caf0660ac8b224450d9d347add Mon Sep 17 00:00:00 2001 From: Leland Lucius Date: Thu, 23 Apr 2015 07:36:04 -0500 Subject: [PATCH] Fix auto-reload of changed Nyquist effects --- src/effects/nyquist/Nyquist.cpp | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/effects/nyquist/Nyquist.cpp b/src/effects/nyquist/Nyquist.cpp index 460731e34..837cb45b7 100644 --- a/src/effects/nyquist/Nyquist.cpp +++ b/src/effects/nyquist/Nyquist.cpp @@ -378,6 +378,24 @@ bool NyquistEffect::SetAutomationParameters(EffectAutomationParameters & parms) // Effect Implementation +bool NyquistEffect::Init() +{ + if (!mExternal) + { + //TODO: If we want to auto-add parameters from spectral selection, + //we will need to modify this test. + //Note that removing it stops the caching of parameter values, + //(during this session). + if (mFileName.GetModificationTime().IsLaterThan(mFileModified)) + { + ParseFile(); + mFileModified = mFileName.GetModificationTime(); + } + } + + return true; +} + bool NyquistEffect::Process() { bool success = true; @@ -1712,19 +1730,6 @@ bool NyquistEffect::TransferDataFromPromptWindow() bool NyquistEffect::TransferDataFromEffectWindow() { - if (!mExternal) - { - //TODO: If we want to auto-add parameters from spectral selection, - //we will need to modify this test. - //Note that removing it stops the caching of parameter values, - //(during this session). - if (mFileName.GetModificationTime().IsLaterThan(mFileModified)) - { - ParseFile(); - mFileModified = mFileName.GetModificationTime(); - } - } - if (mControls.GetCount() == 0) { return true;