From ddf3d3dc669002c1b74f37d27494cf0d5cdafff6 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Mon, 22 Jun 2009 22:07:51 +0200 Subject: [PATCH] AutomationEditor: set pen for painter outside inner loop Set pen for drawing automation pattern outside of inner loop. This might save some CPU cycles. Signed-off-by: Tobias Doerffel --- src/gui/automation_editor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/automation_editor.cpp b/src/gui/automation_editor.cpp index 84f00d225..366cb79dd 100644 --- a/src/gui/automation_editor.cpp +++ b/src/gui/automation_editor.cpp @@ -438,8 +438,6 @@ inline void automationEditor::drawValueRect( QPainter & _p, LmmsStyle::AutomationSelectedBarFill : LmmsStyle::AutomationBarFill ) ); - _p.setPen( engine::getLmmsStyle()->color( - LmmsStyle::AutomationBarValue ) ); _p.drawLine( _x - 1, _y, _x + 1, _y ); _p.drawLine( _x, _y - 1, _x, _y + 1 ); } @@ -1399,6 +1397,8 @@ void automationEditor::paintEvent( QPaintEvent * _pe ) { timeMap & time_map = m_pattern->getTimeMap(); timeMap::iterator it = time_map.begin(); + p.setPen( engine::getLmmsStyle()->color( + LmmsStyle::AutomationBarValue ) ); do { Sint32 len_ticks = 4;