From 7e6c4b8229ea03b25a271a7a61094f28abc504eb Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Fri, 8 Sep 2017 17:11:43 +0200 Subject: Prevent MapItemView from fitting viewport on map when not ready Change-Id: I4c066c858801f9d80974018c00b245ec86c05d1e Reviewed-by: Alex Blasche --- src/location/declarativemaps/qdeclarativegeomapitemview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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) -- cgit v1.2.1