aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2017-03-27 13:29:04 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2017-03-28 08:03:15 +0000
commit55970b212fff45161f94ffe637b49473e8f5925b (patch)
tree7eb68e29cdfaee526593dd028f1d0aab0d3c04af /src/quick/items
parentd55f0433c102dbdbd0b69c8ddbc397a0854d86a0 (diff)
Fix async PathItem results not always showing up
Change-Id: Ie8eb1dd5ea8a560f8160384637cc5d76e3bb7c60 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/quick/items')
-rw-r--r--src/quick/items/qquickpathitemgenericrenderer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/quick/items/qquickpathitemgenericrenderer.cpp b/src/quick/items/qquickpathitemgenericrenderer.cpp
index dfa01f4d42..7a259617dd 100644
--- a/src/quick/items/qquickpathitemgenericrenderer.cpp
+++ b/src/quick/items/qquickpathitemgenericrenderer.cpp
@@ -642,6 +642,12 @@ void QQuickPathItemGenericRenderer::updateStrokeNode(VisualPathData *d, QQuickPa
n->markDirty(QSGNode::DirtyGeometry);
+ // Async loading runs update once, bails out above, then updates again once
+ // ready. Set the material dirty then. This is in-line with fill where the
+ // first activateMaterial() achieves the same.
+ if (!g->vertexCount())
+ n->markDirty(QSGNode::DirtyMaterial);
+
if ((d->effectiveDirty & DirtyColor) && !(d->effectiveDirty & DirtyStrokeGeom)) {
ColoredVertex *vdst = reinterpret_cast<ColoredVertex *>(g->vertexData());
for (int i = 0; i < g->vertexCount(); ++i)