QPainter: simplify the check whether the new brush style is already set
The explicit operator==(QBrush, Qt::BrushStyle) does that already, and more correctly, as it follows the semantics of brush == QBrush(pattern). Change-Id: I35ce25fe2e895e441ed7974d35bef762c7c533cc Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
This commit is contained in:
parent
2ad79c626d
commit
17ac447f46
@ -3763,9 +3763,7 @@ void QPainter::setBrush(Qt::BrushStyle style)
|
||||
qWarning("QPainter::setBrush: Painter not active");
|
||||
return;
|
||||
}
|
||||
if (d->state->brush.style() == style &&
|
||||
(style == Qt::NoBrush
|
||||
|| (style == Qt::SolidPattern && d->state->brush.color() == QColor(0, 0, 0))))
|
||||
if (d->state->brush == style)
|
||||
return;
|
||||
d->state->brush = QBrush(Qt::black, style);
|
||||
if (d->extended)
|
||||
|
Loading…
x
Reference in New Issue
Block a user