summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-08-21 12:39:29 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-08-21 12:39:29 (GMT)
commite59ee48a8656d04339967ad99334bd0ddca0c956 (patch)
tree4fe72429115ae4a4171cd3f1f06d9a3a425973d0 /src/gui/painting
parent4aa6869877d4906fcfaac5388294748512cace25 (diff)
parent508b447075fb852e61ddf88c92c9099dad292747 (diff)
downloadQt-e59ee48a8656d04339967ad99334bd0ddca0c956.zip
Qt-e59ee48a8656d04339967ad99334bd0ddca0c956.tar.gz
Qt-e59ee48a8656d04339967ad99334bd0ddca0c956.tar.bz2
Merge commit 'qt/master'
Diffstat (limited to 'src/gui/painting')
-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 0bca8f7..e1a6e80 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;