Permalink
Browse files

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.
  • Loading branch information...
DomClark authored and PhysSong committed Sep 7, 2018
1 parent 4c7c68f commit c3db486be0cd404b3d1a93d7976b6b4819b957b6
Showing with 5 additions and 5 deletions.
  1. +5 −5 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() );
}
}

0 comments on commit c3db486

Please sign in to comment.