This commit is contained in:
2024-02-04 13:02:19 +03:00
parent 4c7b9444b6
commit 18526cdf29
4 changed files with 27 additions and 7 deletions

View File

@@ -54,6 +54,14 @@ OSM::TilePixmap OSMTileCache::getTile(OSM::TileIndex index, QRectF & rect_src) {
}
bool OSMTileCache::isTileFileExists(OSM::TileIndex index) const {
QString hashdir = index.cacheDir();
if (!cache_dir.exists(hashdir)) return false;
QString hashname = hashdir + "/" + index.hashName();
return cache_dir.exists(hashname);
}
void OSMTileCache::setCacheRoot(const QString & p) {
cache_root = p;
cache_dir.setPath(cache_root);