Commit 2b6517c0 authored by Gus Grubba's avatar Gus Grubba

Optimize SQL set creation.

parent f1b82fb9
......@@ -454,6 +454,7 @@ QGCCacheWorker::_createTileSet(QGCMapTask *mtask)
task->tileSet()->setId(setID);
//-- Prepare Download List
quint64 tileCount = 0;
_db->transaction();
for(int z = task->tileSet()->minZoom(); z <= task->tileSet()->maxZoom(); z++) {
QGCTileSet set = QGCMapEngine::getTileCount(z,
task->tileSet()->topleftLon(), task->tileSet()->topleftLat(),
......@@ -493,6 +494,7 @@ QGCCacheWorker::_createTileSet(QGCMapTask *mtask)
}
}
}
_db->commit();
//-- Done
_updateSetTotals(task->tileSet());
task->setTileSetSaved();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment