Skip to content

Commit

Permalink
Fix VST track cloning in Beat/Bassline editor
Browse files Browse the repository at this point in the history
  • Loading branch information
PhysSong committed Oct 8, 2018
1 parent 9799f3c commit fb5c8f5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/core/BBTrackContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,13 @@ tact_t BBTrackContainer::lengthOfBB( int _bb ) const
MidiTime max_length = MidiTime::ticksPerTact();

const TrackList & tl = tracks();
for( TrackList::const_iterator it = tl.begin(); it != tl.end(); ++it )
for (Track* t : tl)
{
max_length = qMax( max_length,
( *it )->getTCO( _bb )->length() );
// Don't create TCOs here if not exist
if (_bb < t->numOfTCOs())
{
max_length = qMax(max_length, t->getTCO( _bb )->length());
}
}

return max_length.nextFullTact();
Expand Down

0 comments on commit fb5c8f5

Please sign in to comment.