diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2010-09-22 17:52:13 +0200 |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2010-09-22 19:09:41 +0200 |
commit | eaeaba06cea2ca0668a3c904744bab06b11077d0 (patch) | |
tree | 580421c42e0172ec5e26252aa81dc7900342d5a0 /src/gui/graphicsview/qgraphicsview.cpp | |
parent | a8ddc56b1d80b16a3229286d7f0e02323c4203bc (diff) | |
download | qt4-tools-eaeaba06cea2ca0668a3c904744bab06b11077d0.tar.gz |
QPainter not restored correctly in Graphics View.
World transform and opacity was sometimes not restored correctly after
drawing items.
Auto test included.
Task-number: Discovered while working on QTBUG-12760
Diffstat (limited to 'src/gui/graphicsview/qgraphicsview.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsview.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp index c8aca80930..a566c8e93b 100644 --- a/src/gui/graphicsview/qgraphicsview.cpp +++ b/src/gui/graphicsview/qgraphicsview.cpp @@ -3475,7 +3475,8 @@ void QGraphicsView::paintEvent(QPaintEvent *event) // IndirectPainting (the else branch), because in that case we always save() // and restore() in QGraphicsScene::drawItems(). if (!d->scene->d_func()->painterStateProtection) - painter.setWorldTransform(viewTransform); + painter.setOpacity(1.0); + painter.setWorldTransform(viewTransform); } else { // Make sure we don't have unpolished items before we draw if (!d->scene->d_func()->unpolishedItems.isEmpty()) |