Skip to content

Commit

Permalink
Tracks from BBContainer loops tighter
Browse files Browse the repository at this point in the history
  • Loading branch information
zonkmachine committed Aug 8, 2016
1 parent 683578a commit a7e8aa1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/tracks/Pattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,17 @@ MidiTime Pattern::length() const
{
if( ( *it )->length() > 0 )
{
max_length = qMax<tick_t>( max_length,
if( getTrack()->trackContainer()->type() ==
TrackContainer::BBContainer )
{
max_length = qMax<tick_t>( max_length,
( *it )->pos() + 1 );
}
else
{
max_length = qMax<tick_t>( max_length,
( *it )->endPos() );
}
}
}
return MidiTime( max_length ).nextFullTact() *
Expand Down

0 comments on commit a7e8aa1

Please sign in to comment.