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:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user