diff --git a/ChangeLog b/ChangeLog index 904d3487b..c1c892d22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-07-16 Tobias Doerffel + * src/tracks/automation_track.cpp: + fixed behaviour of automation-tracks in BB-editor (closes #2014486) + * include/track.h: * src/core/track.cpp: fixed "Cut"-action on TCOs (closes #2016731) diff --git a/src/tracks/automation_track.cpp b/src/tracks/automation_track.cpp index 806fe773e..d8a8833e7 100644 --- a/src/tracks/automation_track.cpp +++ b/src/tracks/automation_track.cpp @@ -61,8 +61,17 @@ bool automationTrack::play( const midiTime & _start, const fpp_t _frames, } tcoVector tcos; - getTCOsInRange( tcos, _start, _start + static_cast( - _frames / engine::framesPerTick() ) ); + if( _tco_num >= 0 ) + { + trackContentObject * tco = getTCO( _tco_num ); + tcos.push_back( tco ); + } + else + { + getTCOsInRange( tcos, _start, _start + static_cast( + _frames / engine::framesPerTick()) ); + } + for( tcoVector::iterator it = tcos.begin(); it != tcos.end(); ++it ) { automationPattern * p = @@ -71,7 +80,12 @@ bool automationTrack::play( const midiTime & _start, const fpp_t _frames, { continue; } - p->processMidiTime( _start - p->startPosition() ); + midiTime cur_start = _start; + if( _tco_num < 0 ) + { + cur_start -= p->startPosition(); + } + p->processMidiTime( cur_start ); } return( FALSE ); }