summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@jollamobile.com>2015-07-02 17:06:11 +1000
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-07-29 13:59:26 +0000
commit33d57f8018535dfe4ac316fc0f2ebe69fb5ade1c (patch)
treecd92d9daf74286440055b7f4dfb61dbbe008c60d /src
parent040a060519bbada7c3eb03e0dc062d5fd5812ed6 (diff)
downloadqtlocation-33d57f8018535dfe4ac316fc0f2ebe69fb5ade1c.tar.gz
Always update polyline node when a new scene graph node is created
In some situations the item is not marked as dirty when a new node is created. This fixes an issue where the route/polyline is not drawn until the map is interacted with. Change-Id: Ib89646cb804f925fedc668f845ac33cf916a7721 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/imports/location/qdeclarativepolylinemapitem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imports/location/qdeclarativepolylinemapitem.cpp b/src/imports/location/qdeclarativepolylinemapitem.cpp
index f39c6f53..dd041e7e 100644
--- a/src/imports/location/qdeclarativepolylinemapitem.cpp
+++ b/src/imports/location/qdeclarativepolylinemapitem.cpp
@@ -732,7 +732,7 @@ QSGNode *QDeclarativePolylineMapItem::updateMapItemPaintNode(QSGNode *oldNode, U
}
//TODO: update only material
- if (geometry_.isScreenDirty() || dirtyMaterial_) {
+ if (geometry_.isScreenDirty() || dirtyMaterial_ || !oldNode) {
node->update(line_.color(), &geometry_);
geometry_.setPreserveGeometry(false);
geometry_.markClean();