From 00c3f6aed3cdf9db4f3c8e176c6c1b97ce1272bc Mon Sep 17 00:00:00 2001
From: Karol Polak <permotion88@o2.pl>
Date: Sat, 8 Apr 2017 22:42:00 +0200
Subject: [PATCH] Trigger manually map update after initialization

If all of the tiles were loaded from cache and plugin for the map was set after creation of the declarative map, it can occur that item is not updated

Task-number: QTBUG-60021
Change-Id: I260b6219b65ef16726aa767d3a83c6fc756642b5
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
---
 src/location/declarativemaps/qdeclarativegeomap.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/location/declarativemaps/qdeclarativegeomap.cpp b/src/location/declarativemaps/qdeclarativegeomap.cpp
index 8ecd58b9b..fd0b036d7 100644
--- a/src/location/declarativemaps/qdeclarativegeomap.cpp
+++ b/src/location/declarativemaps/qdeclarativegeomap.cpp
@@ -419,6 +419,9 @@ void QDeclarativeGeoMap::initialize()
         emit fieldOfViewChanged(m_cameraData.fieldOfView());
 
     emit mapReadyChanged(true);
+
+    if (m_copyrights)
+         update();
 }
 
 /*!
@@ -810,6 +813,9 @@ void QDeclarativeGeoMap::mappingManagerInitialized()
     // need to be added to m_map
     for (QDeclarativeGeoMapParameter *p : m_mapParameters)
         m_map->addParameter(p);
+
+    if (m_initialized)
+        update();
 }
 
 /*!
-- 
GitLab