color filter: Leave original brush as it was when substituting colors
QBrush is explicitly shared, so when setting the gradient of a copy, we are also changing the gradient of the original.
This commit is contained in:
parent
3210242276
commit
b50920c72b
@ -56,10 +56,10 @@ static inline QBrush qskSubstitutedBrush(
|
||||
|
||||
if ( isModified )
|
||||
{
|
||||
newBrush = brush;
|
||||
|
||||
auto newGradient = const_cast< QGradient* >( newBrush.gradient() );
|
||||
newGradient->setStops( stops );
|
||||
auto newGradient = *gradient;
|
||||
newGradient.setStops( stops );
|
||||
newBrush = QBrush( newGradient );
|
||||
newBrush.setTransform( brush.transform() );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user