summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-10-20 13:35:16 +0200
committerLars Knoll <lars.knoll@digia.com>2014-10-21 08:42:12 +0200
commit90a4c69b2520bfa30364828bda2498e08004c00f (patch)
tree083c5063c4c3cd740234cad7b8fdad89b9c78d3e
parentdc267036e31f9193bad76c803ee162df5ec2d40d (diff)
Produce more correct clip path for QGraphicsShapeItem
If no pen is set on the item, we can completely ignore the pen for the creation of the items shape. This both speeds up the creation of the shape and applying it as a clip mask as well as creating more correct results. Task-number: QTBUG-32846 Change-Id: I5f6f690256c71309713d8f746e67599af3088dd7 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp
index 114c45dc0f..67d135271c 100644
--- a/src/widgets/graphicsview/qgraphicsitem.cpp
+++ b/src/widgets/graphicsview/qgraphicsitem.cpp
@@ -797,7 +797,7 @@ static QPainterPath qt_graphicsItem_shapeFromPath(const QPainterPath &path, cons
// if we pass a value of 0.0 to QPainterPathStroker::setWidth()
const qreal penWidthZero = qreal(0.00000001);
- if (path == QPainterPath())
+ if (path == QPainterPath() || pen == Qt::NoPen)
return path;
QPainterPathStroker ps;
ps.setCapStyle(pen.capStyle());