diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2012-02-06 18:19:46 +0100 |
---|---|---|
committer | Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com> | 2012-02-15 09:47:37 +0100 |
commit | 9e53fff6438dc99488c421d7fbbd0e8b8ac9db8f (patch) | |
tree | 3fe6e436f66b4a7102d30b86a90c4aa73be0deff | |
parent | 83f67c850449e9135b5fb20ef4459dc276a2235f (diff) | |
download | qt4-tools-9e53fff6438dc99488c421d7fbbd0e8b8ac9db8f.tar.gz |
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>
(cherry picked from commit 593947ba70188df3d33efe031fab2fd255faa8b9)
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
-rw-r--r-- | src/gui/painting/qstroker.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/painting/qstroker.cpp b/src/gui/painting/qstroker.cpp index bbb951eb9b..452bb2aa22 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 |