summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2017-08-11 16:22:49 +0300
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2017-08-11 13:37:56 +0000
commite368a651e4ce300df9c42b75841ae31154c49510 (patch)
tree9bf8a2152a74fa1d1e101c91260bc18371f723e7 /src
parent54ca9e278cfb2700a6e904eee602c07778fb6e6b (diff)
downloadqtlocation-e368a651e4ce300df9c42b75841ae31154c49510.tar.gz
Fix MapParameters not having effect on Mapbox GL if added dynamically
The previous code was not handling the case of MapParameters changing the style appearance after the style is fully loaded, which happens when MapParameters are created dynamically at runtime. [ChangeLog][QtLocation][MapboxGL] Fix MapParameter dynamic usage Task-number: QTBUG-61442 Change-Id: I64a8a1416dd5f7477297878f42760ad9008382a4 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp
index c82b98f3..58459e00 100644
--- a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp
+++ b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp
@@ -160,6 +160,11 @@ void QGeoMapMapboxGLPrivate::addParameter(QGeoMapParameter *param)
QObject::connect(param, &QGeoMapParameter::propertyUpdated, q,
&QGeoMapMapboxGL::onParameterPropertyUpdated);
+
+ if (m_styleLoaded) {
+ m_styleChanges << QMapboxGLStyleChange::addMapParameter(param);
+ emit q->sgNodeChanged();
+ }
}
void QGeoMapMapboxGLPrivate::removeParameter(QGeoMapParameter *param)