Refactor redundant pattern color assignment

Instead of creating a new QColor for each condition just use the
`setRgb` method or fix the conditions order.
This commit is contained in:
Amadeus Folego committed 2015-01-08 14:37:10 -02:00
1 parent 86d7e24eb1
commit 1dbc44a7f0
4 files changed
+22 -10

No files matched your search

+1 -1
View File
@@ -267,7 +267,7 @@ void AutomationPatternView::paintEvent( QPaintEvent * )
if( isSelected() == true )
{
c = QColor( qMax( c.red() - 128, 0 ), qMax( c.green() - 128, 0 ), 255 );
c.setRgb( qMax( c.red() - 128, 0 ), qMax( c.green() - 128, 0 ), 255 );
}
lingrad.setColorAt( 1, c.darker( 300 ) );