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.
This commit is contained in:
committed by
Hyunjin Song
parent
4c7c68f45a
commit
c3db486be0
@@ -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() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user