diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2017-08-11 16:22:49 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2017-08-22 12:51:06 +0000 |
commit | cb2d9854615405ebe3b78a5ad4ba477d2f87ecaa (patch) | |
tree | b4c59c188ae93928f407f30c14e588bdae2a8e57 /src | |
parent | c832af789766fcebd8cfb15e53ce14f36278ca6d (diff) | |
download | qtlocation-cb2d9854615405ebe3b78a5ad4ba477d2f87ecaa.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] Fixed 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.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp index 3b9026ce..1001ca31 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) |