1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Fixed tile cache reload issues

This commit is contained in:
Martin Tůma 2020-03-01 11:43:08 +01:00
parent cc22df3bf2
commit ee24bd54f1
3 changed files with 12 additions and 3 deletions

View File

@ -351,7 +351,6 @@ void MapView::setMap(Map *map)
centerOn(nc);
reloadMap();
QPixmapCache::clear();
}
void MapView::setPOI(POI *poi)
@ -982,7 +981,6 @@ void MapView::setDevicePixelRatio(qreal deviceRatio, qreal mapRatio)
_deviceRatio = deviceRatio;
_mapRatio = mapRatio;
QPixmapCache::clear();
QRectF vr(mapToScene(viewport()->rect()).boundingRect()
.intersected(_map->bounds()));

View File

@ -169,6 +169,17 @@ void TileLoader::clearCache()
dir.remove(list.at(i));
_downloader->clearErrors();
QPixmapCache::clear();
}
void TileLoader::setScaledSize(int size)
{
if (_scaledSize == size)
return;
_scaledSize = size;
QPixmapCache::clear();
}
QUrl TileLoader::tileUrl(const Tile &tile) const

View File

@ -16,7 +16,7 @@ public:
void setUrl(const QString &url) {_url = url;}
void setAuthorization(const Authorization &authorization)
{_authorization = authorization;}
void setScaledSize(int size) {_scaledSize = size;}
void setScaledSize(int size);
void setQuadTiles(bool quadTiles) {_quadTiles = quadTiles;}
void loadTilesAsync(QVector<Tile> &list);