AutomationPatternView: fixed painting of automation data

At low pixels/tact ratio automation was not drawn properly due to miscalculation
of x2 variable. This patch fixes this by adding 1 to x2.
This commit is contained in:
Tobias Doerffel
2009-03-16 17:37:25 +01:00
parent 02b06ae91e
commit 9ea3c6660d

View File

@@ -246,12 +246,13 @@ void automationPatternView::paintEvent( QPaintEvent * )
m_pat->getTimeMap().begin();
it != m_pat->getTimeMap().end(); ++it )
{
const float x1 = 2 * x_base + it.key() * ppt /
const float x1 = x_base + it.key() * ppt /
midiTime::ticksPerTact();
float x2;
if( it+1 != m_pat->getTimeMap().end() )
{
x2 = (it+1).key() * ppt / midiTime::ticksPerTact() + 2;
x2 = x_base + (it+1).key() * ppt /
midiTime::ticksPerTact() + 1;
}
else
{