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:
1 parent
86d7e24eb1
commit
1dbc44a7f0
4 files changed
+22
-10
No files matched your search
@@ -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 ) );
|
||||
|
||||
Reference in new issue
Block a user