AutomationPattern: fix a bug I accidentally introduced in length()

This commit is contained in:
Vesa
2014-03-07 11:54:17 +02:00
parent aff2987a43
commit 31fa7ca061

View File

@@ -165,6 +165,7 @@ const AutomatableModel * AutomationPattern::firstObject() const
MidiTime AutomationPattern::length() 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 );
}