PeakControllerEffect: properly save and load all settings
The settings for the new attack and decay controls weren't saved and loaded at all while just the values of all other knobs were saved (instead automation data, controllers etc.).
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* peak_controller_effect_controls.cpp - controls for peakController effect
|
||||
*
|
||||
* Copyright (c) 2008 Paul Giblock <drfaygo/at/gmail/dot/com>
|
||||
* Copyright (c) 2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2009-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -47,10 +47,13 @@ PeakControllerEffectControls( PeakControllerEffect * _eff ) :
|
||||
|
||||
void PeakControllerEffectControls::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
m_baseModel.setValue( _this.attribute( "base" ).toFloat() );
|
||||
m_amountModel.setValue( _this.attribute( "amount" ).toFloat() );
|
||||
m_muteModel.setValue( _this.attribute( "mute" ).toFloat() );
|
||||
|
||||
m_baseModel.loadSettings( _this, "base" );
|
||||
m_amountModel.loadSettings( _this, "amount" );
|
||||
m_muteModel.loadSettings( _this, "mute" );
|
||||
|
||||
m_attackModel.loadSettings( _this, "attack" );
|
||||
m_decayModel.loadSettings( _this, "decay" );
|
||||
|
||||
int effectId = _this.attribute( "effectId" ).toInt();
|
||||
if( effectId > PeakController::s_lastEffectId )
|
||||
{
|
||||
@@ -71,10 +74,14 @@ void PeakControllerEffectControls::loadSettings( const QDomElement & _this )
|
||||
void PeakControllerEffectControls::saveSettings( QDomDocument & _doc,
|
||||
QDomElement & _this )
|
||||
{
|
||||
_this.setAttribute( "base", m_baseModel.value() );
|
||||
_this.setAttribute( "amount", m_amountModel.value() );
|
||||
_this.setAttribute( "mute", m_muteModel.value() );
|
||||
_this.setAttribute( "effectId", m_effect->m_effectId );
|
||||
|
||||
m_baseModel.saveSettings( _doc, _this, "base" );
|
||||
m_amountModel.saveSettings( _doc, _this, "amount" );
|
||||
m_muteModel.saveSettings( _doc, _this, "mute" );
|
||||
|
||||
m_attackModel.saveSettings( _doc, _this, "attack" );
|
||||
m_decayModel.saveSettings( _doc, _this, "decay" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user