Skip to content

Commit c3db486

Browse files
DomClarkPhysSong
authored andcommitted
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.
1 parent 4c7c68f commit c3db486

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

plugins/vst_base/VstPlugin.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ void VstPlugin::tryLoad( const QString &remoteVstPluginExecutable )
157157

158158
void VstPlugin::loadSettings( const QDomElement & _this )
159159
{
160+
if( _this.hasAttribute( "program" ) )
161+
{
162+
setProgram( _this.attribute( "program" ).toInt() );
163+
}
164+
160165
const int num_params = _this.attribute( "numparams" ).toInt();
161166
// if it exists try to load settings chunk
162167
if( _this.hasAttribute( "chunk" ) )
@@ -176,11 +181,6 @@ void VstPlugin::loadSettings( const QDomElement & _this )
176181
}
177182
setParameterDump( dump );
178183
}
179-
180-
if( _this.hasAttribute( "program" ) )
181-
{
182-
setProgram( _this.attribute( "program" ).toInt() );
183-
}
184184
}
185185

186186

0 commit comments

Comments
 (0)