From 533f4759430a04c6b5b43b774102e29f10dfe01d Mon Sep 17 00:00:00 2001 From: Hyunjin Song Date: Tue, 6 Mar 2018 09:57:16 +0900 Subject: [PATCH] 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. --- src/core/AutomationPattern.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/AutomationPattern.cpp b/src/core/AutomationPattern.cpp index c307236d54e..32b13f3f441 100644 --- a/src/core/AutomationPattern.cpp +++ b/src/core/AutomationPattern.cpp @@ -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 ); }