1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-12-05 00:39:09 +01:00

Compare commits

...

7 Commits

Author SHA1 Message Date
mtriau
b64065e076
Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (467 of 467 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/zh_Hans/
2023-04-25 00:10:35 +02:00
Oğuz Ersen
d8af928004
Translated using Weblate (Turkish)
Currently translated at 100.0% (467 of 467 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/tr/
2023-04-25 00:10:35 +02:00
c6766debff Merge remote-tracking branch 'weblate/master' 2023-04-25 00:03:17 +02:00
1eaaf719fd Code cleanup 2023-04-25 00:02:50 +02:00
Hosted Weblate
823a39bcac
Merge branch 'origin/master' into Weblate. 2023-04-23 11:05:05 +02:00
99 efi
64a4d633a3
Translated using Weblate (Hungarian)
Currently translated at 100.0% (467 of 467 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/hu/
2023-04-23 11:05:05 +02:00
Åke Engelbrektson
420fb3ecd2
Translated using Weblate (Swedish)
Currently translated at 100.0% (467 of 467 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/sv/
2023-04-23 08:51:43 +02:00
6 changed files with 23 additions and 23 deletions

View File

@ -712,7 +712,7 @@
<location filename="../src/GUI/gui.cpp" line="907"/>
<location filename="../src/GUI/gui.cpp" line="925"/>
<source>CRS directory:</source>
<translation type="unfinished"></translation>
<translation>CRS könyvtár:</translation>
</message>
<message>
<location filename="../src/GUI/gui.cpp" line="913"/>

View File

@ -962,7 +962,7 @@
<location filename="../src/GUI/gui.cpp" line="907"/>
<location filename="../src/GUI/gui.cpp" line="925"/>
<source>CRS directory:</source>
<translation type="unfinished"></translation>
<translation>CRS-mapp:</translation>
</message>
<message>
<location filename="../src/GUI/gui.cpp" line="915"/>

View File

@ -712,7 +712,7 @@
<location filename="../src/GUI/gui.cpp" line="907"/>
<location filename="../src/GUI/gui.cpp" line="925"/>
<source>CRS directory:</source>
<translation type="unfinished"></translation>
<translation>CRS dizini:</translation>
</message>
<message>
<location filename="../src/GUI/gui.cpp" line="913"/>

View File

@ -866,7 +866,7 @@
<location filename="../src/GUI/gui.cpp" line="907"/>
<location filename="../src/GUI/gui.cpp" line="925"/>
<source>CRS directory:</source>
<translation type="unfinished"></translation>
<translation>CRS </translation>
</message>
<message>
<source>GCS/PCS directory:</source>

View File

@ -41,11 +41,9 @@ static double distance(const Coordinates &c1, const Coordinates &c2)
return hypot(c1.lon() - c2.lon(), c1.lat() - c2.lat());
}
static bool isClosed(const Polygon &poly)
static bool isClosed(const QVector<Coordinates> &poly)
{
if (poly.isEmpty() || poly.first().isEmpty())
return false;
return (distance(poly.first().first(), poly.first().last()) < 0.000000001);
return (distance(poly.first(), poly.last()) < 0.000000001);
}
static bool readSingleDelta(SubFile &subfile, const Coordinates &c,
@ -622,20 +620,20 @@ bool MapData::readPaths(const VectorTile *tile, int zoom, QList<Path> *list)
return false;
}
if (flags & 0x08) {
if (!subfile.readVUInt32(blocks))
if (!subfile.readVUInt32(blocks) || !blocks)
return false;
} else
blocks = 1;
Q_ASSERT(blocks);
for (unsigned j = 0; j < blocks; j++) {
if (!readPolygonPath(subfile, tile->pos, flags & 0x04, p.poly))
return false;
}
p.closed = isClosed(p.poly);
const QVector<Coordinates> &outline = p.poly.first();
p.closed = isClosed(outline);
if (flags & 0x10)
p.labelPos = Coordinates(p.poly.first().first().lon() + MD(lon),
p.poly.first().first().lat() + MD(lat));
p.labelPos = Coordinates(outline.first().lon() + MD(lon),
outline.first().lat() + MD(lat));
list->append(p);
}

View File

@ -62,13 +62,12 @@ private:
class RenderInstruction
{
public:
RenderInstruction() : _pathRender(0), _circleRender(0), _path(0),
_point(0) {}
RenderInstruction() : _render(0), _path(0), _point(0) {}
RenderInstruction(const Style::PathRender *render, PainterPath *path)
: _pathRender(render), _circleRender(0), _path(path), _point(0) {}
: _render(render), _path(path), _point(0) {}
RenderInstruction(const Style::CircleRender *render,
const MapData::Point *point) : _pathRender(0), _circleRender(render),
_path(0), _point(point) {}
const MapData::Point *point) : _render(render), _path(0),
_point(point) {}
bool operator<(const RenderInstruction &other) const
{
@ -78,8 +77,10 @@ private:
return (layer() < other.layer());
}
const Style::PathRender *pathRender() const {return _pathRender;}
const Style::CircleRender *circleRender() const {return _circleRender;}
const Style::PathRender *pathRender() const
{return static_cast<const Style::PathRender*>(_render);}
const Style::CircleRender *circleRender() const
{return static_cast<const Style::CircleRender*>(_render);}
PainterPath *path() const {return _path;}
const MapData::Point *point() const {return _point;}
@ -87,11 +88,12 @@ private:
int layer() const {return _path ? _path->path->layer : _point->layer;}
int zOrder() const
{
return _pathRender ? _pathRender->zOrder() : _circleRender->zOrder();
return _path
? static_cast<const Style::PathRender*>(_render)->zOrder()
: static_cast<const Style::CircleRender*>(_render)->zOrder();
}
const Style::PathRender *_pathRender;
const Style::CircleRender *_circleRender;
const Style::Render *_render;
PainterPath *_path;
const MapData::Point *_point;
};