From ebc9da8c71933956900a61f5145fb943a5571a36 Mon Sep 17 00:00:00 2001 From: Hannu Haahti Date: Thu, 12 Jun 2014 16:20:26 +0300 Subject: [PATCH] kicker: keep start note behaviour for old presets --- plugins/kicker/kicker.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/kicker/kicker.cpp b/plugins/kicker/kicker.cpp index 5fe9c6716..0a653a75f 100644 --- a/plugins/kicker/kicker.cpp +++ b/plugins/kicker/kicker.cpp @@ -108,6 +108,8 @@ void kickerInstrument::saveSettings( QDomDocument & _doc, void kickerInstrument::loadSettings( const QDomElement & _this ) { + m_versionModel.loadSettings( _this, "version" ); + m_startFreqModel.loadSettings( _this, "startfreq" ); m_endFreqModel.loadSettings( _this, "endfreq" ); m_decayModel.loadSettings( _this, "decay" ); @@ -126,18 +128,22 @@ void kickerInstrument::loadSettings( const QDomElement & _this ) m_clickModel.loadSettings( _this, "click" ); m_slopeModel.loadSettings( _this, "slope" ); m_startNoteModel.loadSettings( _this, "startnote" ); + if( m_versionModel.value() < 1 ) + { + m_startNoteModel.setValue( false ); + } m_endNoteModel.loadSettings( _this, "endnote" ); - m_versionModel.loadSettings( _this, "version" ); // Try to maintain backwards compatibility if( !_this.hasAttribute( "version" ) ) { + m_decayModel.setValue( m_decayModel.value() * 1.33f ); m_envModel.setValue( 1.0f ); m_slopeModel.setValue( 1.0f ); m_clickModel.setValue( 0.0f ); - m_versionModel.setValue( KICKER_PRESET_VERSION ); } + m_versionModel.setValue( KICKER_PRESET_VERSION ); }