diff options
| author | Andy Shaw <andy.shaw@qt.io> | 2021-07-13 11:24:08 +0200 |
|---|---|---|
| committer | Andy Shaw <andy.shaw@qt.io> | 2021-07-14 08:58:38 +0200 |
| commit | c31638f16b1fe709dd9df232afb9ab7fac3b231e (patch) | |
| tree | 50b16cd4c38d28b6616e7f9ba50bf2b5f01e928a /src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp | |
| parent | 13d86a3c4e18c4792f246fb2972a5ffe738af65a (diff) | |
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 <mitch.curtis@qt.io>
Diffstat (limited to 'src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp')
| -rw-r--r-- | src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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; } |
