diff --git a/ChangeLog b/ChangeLog index 52831db63..14918801d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-11-04 Tobias Doerffel + + * src/core/effect.cpp: + call saveSettings()/loadSettings() on model rather than loading/saving + value directly - fixes lost automation on basic effect controls + 2008-10-30 Tobias Doerffel * CMakeLists.txt: diff --git a/src/core/effect.cpp b/src/core/effect.cpp index f899ebf9c..bb0cd321c 100644 --- a/src/core/effect.cpp +++ b/src/core/effect.cpp @@ -75,10 +75,10 @@ effect::~effect() void effect::saveSettings( QDomDocument & _doc, QDomElement & _this ) { - _this.setAttribute( "on", m_enabledModel.value() ); - _this.setAttribute( "wet", m_wetDryModel.value() ); - _this.setAttribute( "autoquit", m_autoQuitModel.value() ); - _this.setAttribute( "gate", m_gateModel.value() ); + m_enabledModel.saveSettings( _doc, _this, "on" ); + m_wetDryModel.saveSettings( _doc, _this, "wet" ); + m_autoQuitModel.saveSettings( _doc, _this, "autoquit" ); + m_gateModel.saveSettings( _doc, _this, "gate" ); getControls()->saveState( _doc, _this ); } @@ -87,10 +87,10 @@ void effect::saveSettings( QDomDocument & _doc, QDomElement & _this ) void effect::loadSettings( const QDomElement & _this ) { - m_enabledModel.setValue( (float) _this.attribute( "on" ).toInt() ); - m_wetDryModel.setValue( _this.attribute( "wet" ).toFloat() ); - m_autoQuitModel.setValue( _this.attribute( "autoquit" ).toFloat() ); - m_gateModel.setValue( _this.attribute( "gate" ).toFloat() ); + m_enabledModel.loadSettings( _this, "on" ); + m_wetDryModel.loadSettings( _this, "wet" ); + m_autoQuitModel.loadSettings( _this, "autoquit" ); + m_gateModel.loadSettings( _this, "gate" ); QDomNode node = _this.firstChild(); while( !node.isNull() )