ZynAddSubFX: properly load preset data if knobs are automated/controlled
Commit534c4debb5introduced a regression. If knobs have a song-global automation or controllers attached, they save these settings in a sub XML node which confused the ZASF preset loader which assumed the first child node would always be the ZASF preset data. Fix this by explicitely searching for an XML element named "ZynAddSubFX-data". Closes #3057275. (cherry picked from commit4e695a4ea8)
This commit is contained in:
@@ -209,7 +209,13 @@ void ZynAddSubFxInstrument::loadSettings( const QDomElement & _this )
|
||||
m_forwardMidiCcModel.loadSettings( _this, "forwardmidicc" );
|
||||
|
||||
QDomDocument doc;
|
||||
doc.appendChild( doc.importNode( _this.firstChild(), true ) );
|
||||
QDomElement data = _this.firstChildElement( "ZynAddSubFX-data" );
|
||||
if( data.isNull() )
|
||||
{
|
||||
data = _this.firstChildElement();
|
||||
}
|
||||
doc.appendChild( doc.importNode( data, true ) );
|
||||
|
||||
QTemporaryFile tf;
|
||||
tf.setAutoRemove( false );
|
||||
if( tf.open() )
|
||||
|
||||
Reference in New Issue
Block a user