summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qpainter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 12be93e..5fbe3ed 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -2717,7 +2717,7 @@ void QPainter::setClipRect(const QRectF &rect, Qt::ClipOperation op)
Q_D(QPainter);
if (d->extended) {
- if (!hasClipping() && (op == Qt::IntersectClip || op == Qt::UniteClip))
+ if ((!d->state->clipEnabled && op != Qt::NoClip) || (d->state->clipOperation == Qt::NoClip && op == Qt::UniteClip))
op = Qt::ReplaceClip;
if (!d->engine) {
@@ -2775,7 +2775,7 @@ void QPainter::setClipRect(const QRect &rect, Qt::ClipOperation op)
return;
}
- if (!hasClipping() && (op == Qt::IntersectClip || op == Qt::UniteClip))
+ if ((!d->state->clipEnabled && op != Qt::NoClip) || (d->state->clipOperation == Qt::NoClip && op == Qt::UniteClip))
op = Qt::ReplaceClip;
if (d->extended) {
@@ -2830,7 +2830,7 @@ void QPainter::setClipRegion(const QRegion &r, Qt::ClipOperation op)
return;
}
- if (!hasClipping() && (op == Qt::IntersectClip || op == Qt::UniteClip))
+ if ((!d->state->clipEnabled && op != Qt::NoClip) || (d->state->clipOperation == Qt::NoClip && op == Qt::UniteClip))
op = Qt::ReplaceClip;
if (d->extended) {
@@ -3235,7 +3235,7 @@ void QPainter::setClipPath(const QPainterPath &path, Qt::ClipOperation op)
return;
}
- if (!hasClipping() && (op == Qt::IntersectClip || op == Qt::UniteClip))
+ if ((!d->state->clipEnabled && op != Qt::NoClip) || (d->state->clipOperation == Qt::NoClip && op == Qt::UniteClip))
op = Qt::ReplaceClip;
if (d->extended) {