From 9ea3c6660d22571d93fb26620f766c663102d8b3 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Mon, 16 Mar 2009 17:37:25 +0100 Subject: [PATCH] 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. --- src/gui/automation_pattern_view.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/automation_pattern_view.cpp b/src/gui/automation_pattern_view.cpp index fc765b4da..1ae774206 100644 --- a/src/gui/automation_pattern_view.cpp +++ b/src/gui/automation_pattern_view.cpp @@ -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 {