Skip to content
Permalink
Browse files Browse the repository at this point in the history
Improve fix for avoiding huge number of tiny dashes
Some pathological cases were not caught by the previous fix.

Fixes: QTBUG-95239
Change-Id: I0337ee3923ff93ccb36c4d7b810a9c0667354cc5
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
(cherry picked from commit 6b400e3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
  • Loading branch information
aavit authored and Qt Cherry-pick Bot committed Jul 27, 2021
1 parent 84e1fa3 commit 1ca02cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/painting/qpaintengineex.cpp
Expand Up @@ -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());
Expand Down

0 comments on commit 1ca02cf

Please sign in to comment.