mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-04-19 19:59:11 +02:00
Compare commits
4 Commits
53685253d7
...
d7d193871a
Author | SHA1 | Date | |
---|---|---|---|
d7d193871a | |||
|
4b9bb04cec | ||
d3889b6dfe | |||
240ddaf39c |
@ -587,7 +587,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="487"/>
|
<location filename="../src/GUI/gui.cpp" line="487"/>
|
||||||
<source>Show local DEM tiles</source>
|
<source>Show local DEM tiles</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Näytä paikalliset DEM-laatat</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="490"/>
|
<location filename="../src/GUI/gui.cpp" line="490"/>
|
||||||
@ -699,7 +699,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="695"/>
|
<location filename="../src/GUI/gui.cpp" line="695"/>
|
||||||
<source>Layers</source>
|
<source>Layers</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Kerrokset</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="721"/>
|
<location filename="../src/GUI/gui.cpp" line="721"/>
|
||||||
@ -850,12 +850,12 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="1998"/>
|
<location filename="../src/GUI/gui.cpp" line="1998"/>
|
||||||
<source>DEM tiles download limit exceeded. If you really need data for such a huge area, download the files manually.</source>
|
<source>DEM tiles download limit exceeded. If you really need data for such a huge area, download the files manually.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>DEM-laattojen latausraja ylitetty. Jos todella tarvitset tietoja niin suurelta alueelta, lataa tiedostot manuaalisesti.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="2014"/>
|
<location filename="../src/GUI/gui.cpp" line="2014"/>
|
||||||
<source>Could not download all required DEM files.</source>
|
<source>Could not download all required DEM files.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Kaikkia vaadittuja DEM-tiedostoja ei voitu ladata.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="2048"/>
|
<location filename="../src/GUI/gui.cpp" line="2048"/>
|
||||||
@ -898,12 +898,12 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="476"/>
|
<location filename="../src/GUI/gui.cpp" line="476"/>
|
||||||
<source>Download data DEM</source>
|
<source>Download data DEM</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Lataa data-DEM</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="482"/>
|
<location filename="../src/GUI/gui.cpp" line="482"/>
|
||||||
<source>Download map DEM</source>
|
<source>Download map DEM</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Lataa kartta-DEM</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="762"/>
|
<location filename="../src/GUI/gui.cpp" line="762"/>
|
||||||
@ -961,7 +961,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="1978"/>
|
<location filename="../src/GUI/gui.cpp" line="1978"/>
|
||||||
<source>Clear "%1" tile cache?</source>
|
<source>Clear "%1" tile cache?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Tyhjennetäänkö "%1" ruutuvälimuisti?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message numerus="yes">
|
<message numerus="yes">
|
||||||
<location filename="../src/GUI/gui.cpp" line="2001"/>
|
<location filename="../src/GUI/gui.cpp" line="2001"/>
|
||||||
|
@ -6,31 +6,23 @@ bool AtlasData::pointCb(MapEntry *map, void *context)
|
|||||||
{
|
{
|
||||||
PointCTX *ctx = (PointCTX*)context;
|
PointCTX *ctx = (PointCTX*)context;
|
||||||
|
|
||||||
start:
|
map->lock.lock();
|
||||||
|
|
||||||
ctx->cacheLock.lock();
|
ctx->cacheLock.lock();
|
||||||
|
|
||||||
MapData *cached = ctx->cache.object(map->path);
|
MapData *cached = ctx->cache.object(map->path);
|
||||||
|
|
||||||
if (!cached) {
|
if (!cached) {
|
||||||
ctx->cacheLock.unlock();
|
ctx->cacheLock.unlock();
|
||||||
|
|
||||||
if (map->lock.tryLock()) {
|
MapData *data = new MapData(map->path);
|
||||||
MapData *data = new MapData(map->path);
|
data->points(ctx->rect, ctx->points);
|
||||||
data->points(ctx->rect, ctx->points);
|
|
||||||
|
|
||||||
ctx->cacheLock.lock();
|
ctx->cacheLock.lock();
|
||||||
ctx->cache.insert(map->path, data);
|
ctx->cache.insert(map->path, data);
|
||||||
|
|
||||||
map->lock.unlock();
|
|
||||||
} else {
|
|
||||||
map->lock.lock();
|
|
||||||
map->lock.unlock();
|
|
||||||
goto start;
|
|
||||||
}
|
|
||||||
} else
|
} else
|
||||||
cached->points(ctx->rect, ctx->points);
|
cached->points(ctx->rect, ctx->points);
|
||||||
|
|
||||||
ctx->cacheLock.unlock();
|
ctx->cacheLock.unlock();
|
||||||
|
map->lock.unlock();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -39,34 +31,26 @@ bool AtlasData::polyCb(MapEntry *map, void *context)
|
|||||||
{
|
{
|
||||||
PolyCTX *ctx = (PolyCTX*)context;
|
PolyCTX *ctx = (PolyCTX*)context;
|
||||||
|
|
||||||
start:
|
map->lock.lock();
|
||||||
|
|
||||||
ctx->cacheLock.lock();
|
ctx->cacheLock.lock();
|
||||||
|
|
||||||
MapData *cached = ctx->cache.object(map->path);
|
MapData *cached = ctx->cache.object(map->path);
|
||||||
|
|
||||||
if (!cached) {
|
if (!cached) {
|
||||||
ctx->cacheLock.unlock();
|
ctx->cacheLock.unlock();
|
||||||
|
|
||||||
if (map->lock.tryLock()) {
|
MapData *data = new MapData(map->path);
|
||||||
MapData *data = new MapData(map->path);
|
data->polygons(ctx->rect, ctx->polygons);
|
||||||
data->polygons(ctx->rect, ctx->polygons);
|
data->lines(ctx->rect, ctx->lines);
|
||||||
data->lines(ctx->rect, ctx->lines);
|
|
||||||
|
|
||||||
ctx->cacheLock.lock();
|
ctx->cacheLock.lock();
|
||||||
ctx->cache.insert(map->path, data);
|
ctx->cache.insert(map->path, data);
|
||||||
|
|
||||||
map->lock.unlock();
|
|
||||||
} else {
|
|
||||||
map->lock.lock();
|
|
||||||
map->lock.unlock();
|
|
||||||
goto start;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
cached->polygons(ctx->rect, ctx->polygons);
|
cached->polygons(ctx->rect, ctx->polygons);
|
||||||
cached->lines(ctx->rect, ctx->lines);
|
cached->lines(ctx->rect, ctx->lines);
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx->cacheLock.unlock();
|
ctx->cacheLock.unlock();
|
||||||
|
map->lock.unlock();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user