diff options
author | David Faure <david.faure@kdab.com> | 2014-05-05 19:02:46 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-17 08:59:08 +0200 |
commit | 1aede2d7fc5192776d5c8c9e625478d6d3f55446 (patch) | |
tree | f725c61ff0f18a9a964a645cbb44fbcf115b54aa /src/gui/painting/qpaintengine_raster_p.h | |
parent | 4689a9b3f065db2364ac52e7d867f12363f16b5d (diff) |
QPainter on QBitmap: make setBrush(NoBrush) work as expected.
It had no effect because of an explicit check for NoBrush.
However the default in QBitmap is (unfortunately) QBrush(color0), rather
than NoBrush, so the brush must be updated when calling setBrush(NoBrush).
I suppose the real issue is that lastBrush is default-constructed in
QRasterPaintEngine, rather than starting with the brush from QPainter,
which is QBrush(color0) for the case of the bitmap. But no reason to
special case NoBrush here anyway.
Task-Number: QTBUG-38781
Change-Id: I9996ac12bf628920cfaf0de9c886f637a336028b
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/gui/painting/qpaintengine_raster_p.h')
-rw-r--r-- | src/gui/painting/qpaintengine_raster_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h index 4bfdbd91e0..c4703b3712 100644 --- a/src/gui/painting/qpaintengine_raster_p.h +++ b/src/gui/painting/qpaintengine_raster_p.h @@ -250,7 +250,7 @@ private: QRect toNormalizedFillRect(const QRectF &rect); inline void ensureBrush(const QBrush &brush) { - if (!qbrush_fast_equals(state()->lastBrush, brush) || (brush.style() != Qt::NoBrush && state()->fillFlags)) + if (!qbrush_fast_equals(state()->lastBrush, brush) || state()->fillFlags) updateBrush(brush); } inline void ensureBrush() { ensureBrush(state()->brush); } |