completed recent changes to saveSettings() / loadSettings()

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@810 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-03-24 19:39:12 +00:00
parent 406a90487a
commit f68d50da78
3 changed files with 15 additions and 8 deletions

View File

@@ -225,15 +225,17 @@ void fxMixer::saveSettings( QDomDocument & _doc, QDomElement & _this )
void fxMixer::loadSettings( const QDomElement & _this )
{
clear();
QDomNode node = _this.firstChild();
for( int i = 0; i <= NumFxChannels; ++i )
{
QDomElement fxch = _this.firstChildElement(
QString( "fxchannel%1" ).arg( i ) );
m_fxChannels[i]->m_fxChain.restoreState(
QDomElement fxch = node.toElement();
int num = fxch.attribute( "num" ).toInt();
m_fxChannels[num]->m_fxChain.restoreState(
fxch.firstChildElement(
m_fxChannels[i]->m_fxChain.nodeName() ) );
m_fxChannels[i]->m_volumeModel.loadSettings( fxch, "volume" );
m_fxChannels[i]->m_name = fxch.attribute( "name" );
m_fxChannels[num]->m_fxChain.nodeName() ) );
m_fxChannels[num]->m_volumeModel.loadSettings( fxch, "volume" );
m_fxChannels[num]->m_name = fxch.attribute( "name" );
node = node.nextSibling();
}
emit dataChanged();