summaryrefslogtreecommitdiff
path: root/src/gui/painting/qpainter.cpp
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-08-21 14:39:29 +0200
committerJason Barron <jbarron@trolltech.com>2009-08-21 14:39:29 +0200
commite59ee48a8656d04339967ad99334bd0ddca0c956 (patch)
tree4fe72429115ae4a4171cd3f1f06d9a3a425973d0 /src/gui/painting/qpainter.cpp
parent4aa6869877d4906fcfaac5388294748512cace25 (diff)
parent508b447075fb852e61ddf88c92c9099dad292747 (diff)
downloadqt4-tools-e59ee48a8656d04339967ad99334bd0ddca0c956.tar.gz
Merge commit 'qt/master'
Diffstat (limited to 'src/gui/painting/qpainter.cpp')
-rw-r--r--src/gui/painting/qpainter.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 0bca8f7b67..e1a6e80f60 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -2563,6 +2563,8 @@ void QPainter::setClipRect(const QRectF &rect, Qt::ClipOperation op)
QVectorPath vp(pts, 4, 0, QVectorPath::RectangleHint);
d->state->clipEnabled = true;
d->extended->clip(vp, op);
+ if (op == Qt::ReplaceClip || op == Qt::NoClip)
+ d->state->clipInfo.clear();
d->state->clipInfo << QPainterClipInfo(rect, op, d->state->matrix);
d->state->clipOperation = op;
return;
@@ -2609,6 +2611,8 @@ void QPainter::setClipRect(const QRect &rect, Qt::ClipOperation op)
if (d->extended) {
d->state->clipEnabled = true;
d->extended->clip(rect, op);
+ if (op == Qt::ReplaceClip || op == Qt::NoClip)
+ d->state->clipInfo.clear();
d->state->clipInfo << QPainterClipInfo(rect, op, d->state->matrix);
d->state->clipOperation = op;
return;
@@ -2662,6 +2666,8 @@ void QPainter::setClipRegion(const QRegion &r, Qt::ClipOperation op)
if (d->extended) {
d->state->clipEnabled = true;
d->extended->clip(r, op);
+ if (op == Qt::NoClip || op == Qt::ReplaceClip)
+ d->state->clipInfo.clear();
d->state->clipInfo << QPainterClipInfo(r, op, d->state->matrix);
d->state->clipOperation = op;
return;
@@ -3066,6 +3072,8 @@ void QPainter::setClipPath(const QPainterPath &path, Qt::ClipOperation op)
if (d->extended) {
d->state->clipEnabled = true;
d->extended->clip(path, op);
+ if (op == Qt::NoClip || op == Qt::ReplaceClip)
+ d->state->clipInfo.clear();
d->state->clipInfo << QPainterClipInfo(path, op, d->state->matrix);
d->state->clipOperation = op;
return;