mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-27 21:24:47 +01:00
Added missing cache insert
This commit is contained in:
parent
190a961242
commit
ca6c7247c0
@ -17,7 +17,7 @@ public:
|
||||
const QVariant &zoom() const {return _zoom;}
|
||||
const QPoint &xy() const {return _xy;}
|
||||
const RectD &bbox() const {return _bbox;}
|
||||
QPixmap& pixmap() {return _pixmap;}
|
||||
QPixmap &pixmap() {return _pixmap;}
|
||||
|
||||
private:
|
||||
QPoint _xy;
|
||||
|
@ -61,6 +61,7 @@ TileLoader::TileLoader(const QString &dir, QObject *parent)
|
||||
connect(_downloader, &Downloader::finished, this, &TileLoader::finished);
|
||||
}
|
||||
|
||||
|
||||
void TileLoader::loadTilesAsync(QVector<FetchTile> &list)
|
||||
{
|
||||
QList<Download> dl;
|
||||
@ -142,6 +143,11 @@ void TileLoader::loadTilesSync(QVector<FetchTile> &list)
|
||||
|
||||
QFuture<void> future = QtConcurrent::map(imgs, &TileImage::load);
|
||||
future.waitForFinished();
|
||||
|
||||
for (int i = 0; i < imgs.size(); i++) {
|
||||
TileImage &ti = imgs[i];
|
||||
QPixmapCache::insert(ti.file(), ti.tile()->pixmap());
|
||||
}
|
||||
}
|
||||
|
||||
void TileLoader::clearCache()
|
||||
|
Loading…
Reference in New Issue
Block a user