diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2010-09-22 15:52:13 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2010-09-22 17:09:41 (GMT) |
commit | eaeaba06cea2ca0668a3c904744bab06b11077d0 (patch) | |
tree | 580421c42e0172ec5e26252aa81dc7900342d5a0 /src/gui/graphicsview/qgraphicsview.cpp | |
parent | a8ddc56b1d80b16a3229286d7f0e02323c4203bc (diff) | |
download | Qt-eaeaba06cea2ca0668a3c904744bab06b11077d0.zip Qt-eaeaba06cea2ca0668a3c904744bab06b11077d0.tar.gz Qt-eaeaba06cea2ca0668a3c904744bab06b11077d0.tar.bz2 |
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 c8aca80..a566c8e 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()) |