From a8b6d332a6639b5dd2f3ac938251b12b7e4ad406 Mon Sep 17 00:00:00 2001 From: Andreas Aardal Hanssen Date: Tue, 21 Apr 2009 16:05:42 +0200 Subject: BT: Revert "Fixes: Don't fill the pixmap because we will copy the cache into it." This reverts commit 0985805ab3c7de5b15c115a98afb15944b6d93b9. The Elastic Nodes example shows a black background for the cache pixmap if the call to fill isn't there. Alexis and I both agree that it makes no sense that we fill the pixmap with transparent pixels instead of just drawing with QPainter::CompositionMode_Source, but since this regression was introduced after 4.5.0 was released we must revert before we investigate further. Reviewed-by: Alexis (cherry picked from commit 183cb6052c45d7c83e36c78da4e2c59c768209c7) --- src/gui/graphicsview/qgraphicsscene.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 5cd69b3917..0012d98c0b 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -4890,9 +4890,11 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte if (newCacheIndent != deviceData->cacheIndent || deviceRect.size() != pix.size()) { QPoint diff = newCacheIndent - deviceData->cacheIndent; QPixmap newPix(deviceRect.size()); + // ### Investigate removing this fill (test with Plasma and + // graphicssystem raster). + newPix.fill(Qt::transparent); if (!pix.isNull()) { QPainter newPixPainter(&newPix); - newPixPainter.setCompositionMode(QPainter::CompositionMode_Source); newPixPainter.drawPixmap(-diff, pix); newPixPainter.end(); } -- cgit v1.2.3