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>
This commit is contained in:
parent
85cfbae1d6
commit
6b400e3147
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user