summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/location/declarativemaps/qdeclarativegeomap.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeomap.cpp b/src/location/declarativemaps/qdeclarativegeomap.cpp
index d7f93d14..fefffeb6 100644
--- a/src/location/declarativemaps/qdeclarativegeomap.cpp
+++ b/src/location/declarativemaps/qdeclarativegeomap.cpp
@@ -916,7 +916,8 @@ void QDeclarativeGeoMap::setZoomLevel(qreal zoomLevel)
*/
void QDeclarativeGeoMap::setZoomLevel(qreal zoomLevel, bool overzoom)
{
- if (m_cameraData.zoomLevel() == zoomLevel || zoomLevel < 0)
+ const qreal oldZoom = m_cameraData.zoomLevel();
+ if (oldZoom == zoomLevel || zoomLevel < 0)
return;
//small optimization to avoid double setCameraData
@@ -940,7 +941,8 @@ void QDeclarativeGeoMap::setZoomLevel(qreal zoomLevel, bool overzoom)
if (centerHasChanged)
emit centerChanged(m_cameraData.center());
- emit zoomLevelChanged(m_cameraData.zoomLevel());
+ if (oldZoom != m_cameraData.zoomLevel())
+ emit zoomLevelChanged(m_cameraData.zoomLevel());
}
qreal QDeclarativeGeoMap::zoomLevel() const