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
This commit is contained in:
Tobias Doerffel
2008-07-28 08:04:21 +00:00
parent 12c6e194bc
commit 5567fb3056

View File

@@ -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;
}
}