mirror of
https://github.com/LMMS/lmms.git
synced 2026-03-24 00:43:22 -04:00
when connecting object to automation-pattern which has no object connected yet, set default-value (closes #2026102)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1385 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -92,6 +92,20 @@ automationPattern::~automationPattern()
|
||||
|
||||
|
||||
|
||||
void automationPattern::addObject( automatableModel * _obj )
|
||||
{
|
||||
m_objects += _obj;
|
||||
// been empty before?
|
||||
if( m_objects.size() == 1 && !hasAutomation() )
|
||||
{
|
||||
// then initialize default-value
|
||||
putValue( 0, _obj->value<float>(), FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const automatableModel * automationPattern::firstObject( void ) const
|
||||
{
|
||||
if( !m_objects.isEmpty() )
|
||||
|
||||
Reference in New Issue
Block a user