From 5567fb30567163e1af78eac949b9207f45fdae36 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Mon, 28 Jul 2008 08:04:21 +0000 Subject: [PATCH] when loading legacy automation with only one value in, eliminate global automation pattern right after loading data git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1390 0778d3d1-df1d-0410-868b-ea421aaaa00d --- src/core/automatable_model.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/automatable_model.cpp b/src/core/automatable_model.cpp index f066a4265..de58e19c9 100644 --- a/src/core/automatable_model.cpp +++ b/src/core/automatable_model.cpp @@ -144,6 +144,12 @@ void automatableModel::loadSettings( const QDomElement & _this, globalAutomationPattern( this ); p->loadSettings( node.toElement() ); setValue( p->valueAt( 0 ) ); + // in older projects we sometimes have odd automations + // with just one value in - eliminate if neccessary + if( !p->hasAutomation() ) + { + delete p; + } return; } }