Skip to content

Commit

Permalink
Ensure correct length of automation patterns in BB editor (LMMS#4212)
Browse files Browse the repository at this point in the history
When the length of an automation pattern is an integer multiple of one bar, it was displayed with wrong length. This commit fixes the bug.
  • Loading branch information
PhysSong authored Mar 6, 2018
1 parent 0c756ef commit 31edec9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/AutomationPattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ MidiTime AutomationPattern::timeMapLength() const
{
if( m_timeMap.isEmpty() ) return 0;
timeMap::const_iterator it = m_timeMap.end();
return MidiTime( qMax( MidiTime( (it-1).key() ).getTact() + 1, 1 ), 0 );
return MidiTime( MidiTime( (it-1).key() ).nextFullTact(), 0 );
}


Expand Down

0 comments on commit 31edec9

Please sign in to comment.