summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-09-08 17:11:43 +0200
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-09-11 08:27:25 +0000
commit7e6c4b8229ea03b25a271a7a61094f28abc504eb (patch)
treeb7dcb30157783734749c55630d71864b1e627063
parent97bce501d5dc0f8e09e9607c24943ecd72fb7545 (diff)
downloadqtlocation-7e6c4b8229ea03b25a271a7a61094f28abc504eb.tar.gz
Prevent MapItemView from fitting viewport on map when not ready
Change-Id: I4c066c858801f9d80974018c00b245ec86c05d1e Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r--src/location/declarativemaps/qdeclarativegeomapitemview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeomapitemview.cpp b/src/location/declarativemaps/qdeclarativegeomapitemview.cpp
index a17bf672..8207caa5 100644
--- a/src/location/declarativemaps/qdeclarativegeomapitemview.cpp
+++ b/src/location/declarativemaps/qdeclarativegeomapitemview.cpp
@@ -378,7 +378,7 @@ void QDeclarativeGeoMapItemView::setAutoFitViewport(const bool &fitViewport)
*/
void QDeclarativeGeoMapItemView::fitViewport()
{
- if (!map_ || !fitViewport_ || m_repopulating)
+ if (!map_ || !map_->mapReady() || !fitViewport_ || m_repopulating)
return;
if (map_->mapItems().size() > 0)