From c3db486be0cd404b3d1a93d7976b6b4819b957b6 Mon Sep 17 00:00:00 2001 From: Dominic Clark Date: Fri, 7 Sep 2018 22:02:45 +0100 Subject: [PATCH] Set VST program first when restoring settings Fixes a bug where some VSTs (e.g. Temper) would have their settings reset on project load, due to using programs as presets. --- plugins/vst_base/VstPlugin.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/vst_base/VstPlugin.cpp b/plugins/vst_base/VstPlugin.cpp index 26c789275..157665eb5 100644 --- a/plugins/vst_base/VstPlugin.cpp +++ b/plugins/vst_base/VstPlugin.cpp @@ -157,6 +157,11 @@ void VstPlugin::tryLoad( const QString &remoteVstPluginExecutable ) void VstPlugin::loadSettings( const QDomElement & _this ) { + if( _this.hasAttribute( "program" ) ) + { + setProgram( _this.attribute( "program" ).toInt() ); + } + const int num_params = _this.attribute( "numparams" ).toInt(); // if it exists try to load settings chunk if( _this.hasAttribute( "chunk" ) ) @@ -176,11 +181,6 @@ void VstPlugin::loadSettings( const QDomElement & _this ) } setParameterDump( dump ); } - - if( _this.hasAttribute( "program" ) ) - { - setProgram( _this.attribute( "program" ).toInt() ); - } }