From d13ac2a54a9f83132fc620ff14125a7f05f6da46 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Fri, 18 Jul 2008 13:00:07 +0000 Subject: [PATCH] fixed behaviour for inline-automations with only one value in time-map git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1329 0778d3d1-df1d-0410-868b-ea421aaaa00d --- include/detuning_helper.h | 5 +++++ include/inline_automation.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/detuning_helper.h b/include/detuning_helper.h index a301244ef..554041d2e 100644 --- a/include/detuning_helper.h +++ b/include/detuning_helper.h @@ -42,6 +42,11 @@ public: { } + virtual float defaultValue( void ) const + { + return( 0 ); + } + virtual QString displayName( void ) const { return( tr( "Note detuning" ) ); diff --git a/include/inline_automation.h b/include/inline_automation.h index 89fcda266..2a208eb81 100644 --- a/include/inline_automation.h +++ b/include/inline_automation.h @@ -48,10 +48,12 @@ public: } } + virtual float defaultValue( void ) const = 0; + inline bool hasAutomation( void ) const { return( m_autoPattern != NULL && - m_autoPattern->hasAutomation() ); + m_autoPattern->getTimeMap()[0] != defaultValue() ); } automationPattern * getAutomationPattern( void )