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 <tobias.doerffel@gmail.com>
This commit is contained in:
Tobias Doerffel
2009-06-22 22:07:51 +02:00
parent 0ae508d65f
commit ddf3d3dc66

View File

@@ -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;