summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengine.cpp
diff options
context:
space:
mode:
authorBjoern Erik Nilsen <bnilsen@trolltech.com>2009-04-24 17:34:28 +0200
committerBjoern Erik Nilsen <bnilsen@trolltech.com>2009-04-24 17:34:28 +0200
commited21b9dafea192ddd39f1d2a4abcb54962d6dfb8 (patch)
tree62bb3042bc91353c3e6293ad7eb48a3389b0fb69 /src/gui/painting/qpaintengine.cpp
parentdeffb8578757550e57ea3058e95a758155632226 (diff)
Sometimes wrong clipping in QWidget::render() when passing a device or
an untransformed painter When passing a painter to QWidget::render, we use the painter->paintEngine()->systemClip() as the "system viewport", i.e. all painting triggered by render() should be limited to this area. The only way to achieve this is by always ensuring the system clip is clipped to the same area (systemClip &= systemViewport). The problem however, was that we only did this for transformed painters. We must of course always do it when there's a systemViewport set, regardless of whether the painter is transformed or not. Auto test included. Task-number: 248852 Reviewed-by: Trond
Diffstat (limited to 'src/gui/painting/qpaintengine.cpp')
-rw-r--r--src/gui/painting/qpaintengine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/painting/qpaintengine.cpp b/src/gui/painting/qpaintengine.cpp
index ad09060614..7de1ec4b1c 100644
--- a/src/gui/painting/qpaintengine.cpp
+++ b/src/gui/painting/qpaintengine.cpp
@@ -949,8 +949,8 @@ void QPaintEngine::setSystemClip(const QRegion &region)
Q_D(QPaintEngine);
d->systemClip = region;
// Be backward compatible and only call d->systemStateChanged()
- // if we currently have a system transform set.
- if (d->hasSystemTransform) {
+ // if we currently have a system transform/viewport set.
+ if (d->hasSystemTransform || d->hasSystemViewport) {
d->transformSystemClip();
d->systemStateChanged();
}