summaryrefslogtreecommitdiff
path: root/src/imports
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2016-08-25 12:06:32 +0200
committerPaolo Angelelli <paolo.angelelli@qt.io>2016-12-01 13:45:39 +0000
commit6ac41c0f58f34606afaa289243d762afd5f879d4 (patch)
tree91dc1699302673bc0131440a04110cb5ea6adef2 /src/imports
parent423d96a446cdacfe77722bd0cd3375022b2931f5 (diff)
downloadqtlocation-6ac41c0f58f34606afaa289243d762afd5f879d4.tar.gz
Checking for map presence before fitting to geoshape
With this patch, m_pendingFitViewport is set also if m_map is not yet set. Otherwise fitViewportToGeoShape() fails silently, but the flag doesn't get set, and when the map will finally be set, the fitting operation won't be performed Change-Id: Ibfb147d89510e6512fed2d711bb31b12b4a39657 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/location/qdeclarativegeomap.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imports/location/qdeclarativegeomap.cpp b/src/imports/location/qdeclarativegeomap.cpp
index fe8675c0..dcf8b203 100644
--- a/src/imports/location/qdeclarativegeomap.cpp
+++ b/src/imports/location/qdeclarativegeomap.cpp
@@ -802,7 +802,7 @@ void QDeclarativeGeoMap::setVisibleRegion(const QGeoShape &shape)
return;
}
- if (!width() || !height()) {
+ if (!m_map || !width() || !height()) {
m_pendingFitViewport = true;
return;
}