summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2012-02-06 17:19:46 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-02-07 16:29:06 (GMT)
commit593947ba70188df3d33efe031fab2fd255faa8b9 (patch)
treedefdf6b28650a9f8efcb3eaeef007f7622700f52 /src
parentb0d5bf719298e1b99deed493ac6a9ee4dd689e22 (diff)
downloadQt-593947ba70188df3d33efe031fab2fd255faa8b9.zip
Qt-593947ba70188df3d33efe031fab2fd255faa8b9.tar.gz
Qt-593947ba70188df3d33efe031fab2fd255faa8b9.tar.bz2
Fixed CustomDashLine drawing bug.
The bug was caused by attempting to stroke an empty subpath. If there have been no line-to's emitted we should not try to join the start and end of that line segment. Task-number: QTBUG-23248 Change-Id: I38b7e955ed6683f8fc25f9551e93b4f472c022bf Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qstroker.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/painting/qstroker.cpp b/src/gui/painting/qstroker.cpp
index f7e50c8..a6ed08f 100644
--- a/src/gui/painting/qstroker.cpp
+++ b/src/gui/painting/qstroker.cpp
@@ -756,7 +756,9 @@ template <class Iterator> bool qt_stroke_side(Iterator *it,
#ifdef QPP_STROKE_DEBUG
qDebug("\n ---> (side) closed subpath");
#endif
- stroker->joinPoints(prev.x, prev.y, *startTangent, stroker->joinStyleMode());
+ // don't join empty subpaths
+ if (!first)
+ stroker->joinPoints(prev.x, prev.y, *startTangent, stroker->joinStyleMode());
return true;
} else {
#ifdef QPP_STROKE_DEBUG