Skip to content

Commit

Permalink
Set VST program first when restoring settings
Browse files Browse the repository at this point in the history
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 11, 2018
1 parent 4c7c68f commit c3db486
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugins/vst_base/VstPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" ) )
Expand All @@ -176,11 +181,6 @@ void VstPlugin::loadSettings( const QDomElement & _this )
}
setParameterDump( dump );
}

if( _this.hasAttribute( "program" ) )
{
setProgram( _this.attribute( "program" ).toInt() );
}
}


Expand Down

0 comments on commit c3db486

Please sign in to comment.