ZynAddSubFX: properly load preset data if knobs are automated/controlled

Commit 534c4debb5 introduced 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 commit 4e695a4ea8)
This commit is contained in:
Tobias Doerffel
2010-09-01 23:23:13 +02:00
parent 58462500d0
commit 18d3c886a6

View File

@@ -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() )