diff options
Diffstat (limited to 'src/gui/painting/qpathclipper.cpp')
-rw-r--r-- | src/gui/painting/qpathclipper.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp index addd9c0c2c..924d332452 100644 --- a/src/gui/painting/qpathclipper.cpp +++ b/src/gui/painting/qpathclipper.cpp @@ -2096,7 +2096,12 @@ QPainterPath intersectPath(const QPainterPath &path, const QRectF &rect) result.addPath(subPath); } } - return result; + // The algorithm above might return one side of \a rect if there was no intersection, + // so only return intersections that are not empty rectangles. + if (result.boundingRect().isEmpty()) + return QPainterPath(); + else + return result; } } |