From c31638f16b1fe709dd9df232afb9ab7fac3b231e Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Tue, 13 Jul 2021 11:24:08 +0200 Subject: When setting the line dash to be an empty array reset the style to Solid An empty line dash array is indicating that it should be reset to be a Solid line, otherwise it ends up reusing the previous settings for the pen instead of drawing a solid line. Fixes: QTBUG-75553 Pick-to: 6.2 6.1 5.15 Change-Id: I16466672de95da8ef0cf3fc261969e7cc6add227 Reviewed-by: Mitch Curtis --- src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp') diff --git a/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp b/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp index e3f8acad00..18bfc66eee 100644 --- a/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp +++ b/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp @@ -371,7 +371,10 @@ void QQuickContext2DCommandBuffer::replay(QPainter* p, QQuickContext2D::State& s } state.lineDash = pattern; QPen nPen = p->pen(); - nPen.setDashPattern(pattern); + if (count > 0) + nPen.setDashPattern(pattern); + else + nPen.setStyle(Qt::SolidLine); p->setPen(nPen); break; } -- cgit v1.2.3