diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2021-07-23 15:53:56 +0200 |
---|---|---|
committer | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2021-07-27 17:44:30 +0200 |
commit | 6b400e3147dcfd8cc3a393ace1bd118c93762e0c (patch) | |
tree | 22762df59de982e6994b35564b84ceb95d8275dd /src | |
parent | 85cfbae1d62617fdc452680813f993e812bb55dd (diff) |
Improve fix for avoiding huge number of tiny dashes
Some pathological cases were not caught by the previous fix.
Fixes: QTBUG-95239
Pick-to: 6.2 6.1 5.15
Change-Id: I0337ee3923ff93ccb36c4d7b810a9c0667354cc5
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/painting/qpaintengineex.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp index 2997d53310..22e9a621c3 100644 --- a/src/gui/painting/qpaintengineex.cpp +++ b/src/gui/painting/qpaintengineex.cpp @@ -426,7 +426,7 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &inPen) patternLength *= pen.widthF(); if (qFuzzyIsNull(patternLength)) { pen.setStyle(Qt::NoPen); - } else if (extent / patternLength > 10000) { + } else if (qFuzzyIsNull(extent) || extent / patternLength > 10000) { // approximate stream of tiny dashes with semi-transparent solid line pen.setStyle(Qt::SolidLine); QColor color(pen.color()); |