Ensure correct length of automation patterns in BB editor (#4212)

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.
This commit is contained in:
Hyunjin Song
2018-03-06 09:57:16 +09:00
committed by GitHub
parent 1d63bd3b4e
commit 533f475943

View File

@@ -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 );
}