- added constructor for unlinking objects
- don't remove value at position 0 git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@335 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -89,6 +89,25 @@ automationPattern::automationPattern( const automationPattern & _pat_to_copy ) :
|
||||
|
||||
|
||||
|
||||
automationPattern::automationPattern( const automationPattern & _pat_to_copy,
|
||||
levelObject * _object ) :
|
||||
journallingObject( _pat_to_copy.m_track->eng() ),
|
||||
m_track( _pat_to_copy.m_track ),
|
||||
m_object( _object ),
|
||||
m_update_first( _pat_to_copy.m_update_first )
|
||||
{
|
||||
for( timeMap::const_iterator it = _pat_to_copy.m_time_map.begin();
|
||||
it != _pat_to_copy.m_time_map.end(); ++it )
|
||||
{
|
||||
m_time_map[it.key()] = it.data();
|
||||
}
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
automationPattern::~automationPattern()
|
||||
{
|
||||
if( m_track )
|
||||
@@ -156,7 +175,10 @@ midiTime automationPattern::putValue( const midiTime & _time, const int _value,
|
||||
|
||||
void automationPattern::removeValue( const midiTime & _time )
|
||||
{
|
||||
m_time_map.remove( _time );
|
||||
if( _time != 0 )
|
||||
{
|
||||
m_time_map.remove( _time );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user