From 547a1f53050b887bacb766ea95381cde072a6d3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Mon, 6 Feb 2012 18:19:46 +0100 Subject: 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 (cherry picked from commit 593947ba70188df3d33efe031fab2fd255faa8b9) --- src/gui/painting/qstroker.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gui/painting') diff --git a/src/gui/painting/qstroker.cpp b/src/gui/painting/qstroker.cpp index ddf828982a..1201a481b6 100644 --- a/src/gui/painting/qstroker.cpp +++ b/src/gui/painting/qstroker.cpp @@ -756,7 +756,9 @@ template 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 -- cgit v1.2.3