diff options
author | Paolo Angelelli <paolo.angelelli@theqtcompany.com> | 2016-05-26 13:11:43 +0200 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@theqtcompany.com> | 2016-05-31 12:00:11 +0000 |
commit | ef471a0254c7c3a5978d06980f1e7e32229f21b4 (patch) | |
tree | e012c4be7b02f8d87f119911e90ca7b3d12a5385 /src | |
parent | 7ba211266c50f5c324a7cf22b3eb7d77dd123a91 (diff) | |
download | qtlocation-ef471a0254c7c3a5978d06980f1e7e32229f21b4.tar.gz |
Polish and update map elements on window resize
When the a map element gets resized, the center stays the same, meaning
that map estate gets added (or removed) on each side of the element in
equal amount.
This means that the old screen coordinates of a map element change, and
therefore it must be repolished and updated.
Task-number: QTBUG-53128
Change-Id: Id26b111e8e33075082fa599e6eac92cb8089f5e4
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/location/qdeclarativegeomapitembase.cpp | 2 | ||||
-rw-r--r-- | src/imports/location/qdeclarativegeomapquickitem.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/imports/location/qdeclarativegeomapitembase.cpp b/src/imports/location/qdeclarativegeomapitembase.cpp index cde00abf..3cd29ce3 100644 --- a/src/imports/location/qdeclarativegeomapitembase.cpp +++ b/src/imports/location/qdeclarativegeomapitembase.cpp @@ -133,6 +133,8 @@ void QDeclarativeGeoMapItemBase::setMap(QDeclarativeGeoMap *quickMap, QGeoMap *m if (map_ && quickMap_) { connect(map_, SIGNAL(cameraDataChanged(QGeoCameraData)), this, SLOT(baseCameraDataChanged(QGeoCameraData))); + connect(quickMap, SIGNAL(heightChanged()), this, SLOT(polishAndUpdate())); + connect(quickMap, SIGNAL(widthChanged()), this, SLOT(polishAndUpdate())); lastSize_ = QSizeF(quickMap_->width(), quickMap_->height()); lastCameraData_ = map_->cameraData(); } diff --git a/src/imports/location/qdeclarativegeomapquickitem.cpp b/src/imports/location/qdeclarativegeomapquickitem.cpp index ca67b183..a66efb1d 100644 --- a/src/imports/location/qdeclarativegeomapquickitem.cpp +++ b/src/imports/location/qdeclarativegeomapquickitem.cpp @@ -157,8 +157,6 @@ void QDeclarativeGeoMapQuickItem::setMap(QDeclarativeGeoMap *quickMap, QGeoMap * { QDeclarativeGeoMapItemBase::setMap(quickMap,map); if (map && quickMap) { - connect(quickMap, SIGNAL(heightChanged()), this, SLOT(polishAndUpdate())); - connect(quickMap, SIGNAL(widthChanged()), this, SLOT(polishAndUpdate())); connect(map, SIGNAL(cameraDataChanged(QGeoCameraData)), this, SLOT(polishAndUpdate())); polishAndUpdate(); |