diff options
author | Michal Klocek <michal.klocek@theqtcompany.com> | 2015-05-18 11:12:16 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@theqtcompany.com> | 2015-06-04 14:50:51 +0000 |
commit | 374077292b4be4a03eb8ca9a6eaae41e4de6f942 (patch) | |
tree | 2f56803b02c81337660743720745abe65e923114 /src/location/maps/qgeomapscene.cpp | |
parent | 2d10f0a06c4aa99257cafb6729034f9f843fb31c (diff) | |
download | qtlocation-374077292b4be4a03eb8ca9a6eaae41e4de6f942.tar.gz |
Fix tile version handling
Here maps plugin checks server for tile version.
When tile version is updated, update not only
the current camera tiles, but also scene tiles.
Task-number: QTBUG-44809
Change-Id: Iedb3add5308a2e61cc18e169e33ea4510e1a4fee
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/location/maps/qgeomapscene.cpp')
-rw-r--r-- | src/location/maps/qgeomapscene.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/location/maps/qgeomapscene.cpp b/src/location/maps/qgeomapscene.cpp index a448937b..4e6bb4a6 100644 --- a/src/location/maps/qgeomapscene.cpp +++ b/src/location/maps/qgeomapscene.cpp @@ -156,6 +156,12 @@ void QGeoMapScene::setVisibleTiles(const QSet<QGeoTileSpec> &tiles) d->setVisibleTiles(tiles); } +const QSet<QGeoTileSpec> &QGeoMapScene::visibleTiles() const +{ + Q_D(const QGeoMapScene); + return d->m_visibleTiles; +} + void QGeoMapScene::addTile(const QGeoTileSpec &spec, QSharedPointer<QGeoTileTexture> texture) { Q_D(QGeoMapScene); @@ -325,14 +331,8 @@ void QGeoMapScenePrivate::addTile(const QGeoTileSpec &spec, QSharedPointer<QGeoT m_textures.insert(spec, texture); } -// return true if new tiles introduced in [tiles] void QGeoMapScenePrivate::setVisibleTiles(const QSet<QGeoTileSpec> &tiles) { - Q_Q(QGeoMapScene); - - // detect if new tiles introduced - bool newTilesIntroduced = !m_visibleTiles.contains(tiles); - // work out the tile bounds for the new scene setTileBounds(tiles); @@ -344,8 +344,6 @@ void QGeoMapScenePrivate::setVisibleTiles(const QSet<QGeoTileSpec> &tiles) removeTiles(toRemove); m_visibleTiles = tiles; - if (newTilesIntroduced) - emit q->newTilesVisible(m_visibleTiles); } void QGeoMapScenePrivate::removeTiles(const QSet<QGeoTileSpec> &oldTiles) |