1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 11:45:53 +01:00

Compare commits

..

No commits in common. "70ddd831541bd03853625c98b71e3a3fc81c59eb" and "9a8070bd06db659858e032a9612c53a4a2e56185" have entirely different histories.

6 changed files with 28 additions and 42 deletions

View File

@ -1,4 +1,4 @@
version: 13.28.{build} version: 13.27.{build}
configuration: configuration:
- Release - Release

View File

@ -3,7 +3,7 @@ unix:!macx:!android {
} else { } else {
TARGET = GPXSee TARGET = GPXSee
} }
VERSION = 13.28 VERSION = 13.27
QT += core \ QT += core \

View File

@ -37,7 +37,7 @@ Unicode true
; The name of the installer ; The name of the installer
Name "GPXSee" Name "GPXSee"
; Program version ; Program version
!define VERSION "13.28" !define VERSION "13.27"
; The file to write ; The file to write
OutFile "GPXSee-${VERSION}_x64.exe" OutFile "GPXSee-${VERSION}_x64.exe"

View File

@ -107,20 +107,20 @@ void RasterTile::processPointLabels(const QList<MapData::Point> &points,
for (int j = 0; j < symbols.size(); j++) { for (int j = 0; j < symbols.size(); j++) {
const Style::Symbol *ri = symbols.at(j); const Style::Symbol *ri = symbols.at(j);
if (ri->rule().match(point.tags)) {
si = ri; if (ri->rule().match(point.tags))
break; if (!si || si->priority() < ri->priority())
} si = ri;
} }
for (int j = 0; j < labels.size(); j++) { for (int j = 0; j < labels.size(); j++) {
const Style::TextRender *ri = labels.at(j); const Style::TextRender *ri = labels.at(j);
if (ri->rule().match(point.tags)) { if (ri->rule().match(point.tags)) {
if ((lbl = label(ri->key(), point.tags))) { if ((lbl = label(ri->key(), point.tags))) {
if (!si || si->id() == ri->symbolId()) { if (si && si->id() != ri->symbolId())
continue;
if (!ti || ti->priority() < ri->priority())
ti = ri; ti = ri;
break;
}
} }
} }
} }
@ -166,20 +166,21 @@ void RasterTile::processAreaLabels(const QVector<PainterPath> &paths,
for (int j = 0; j < symbols.size(); j++) { for (int j = 0; j < symbols.size(); j++) {
const Style::Symbol *ri = symbols.at(j); const Style::Symbol *ri = symbols.at(j);
if (ri->rule().match(path.path->closed, path.path->tags)) {
si = ri; if (ri->rule().match(path.path->closed, path.path->tags))
break; if (!si || si->priority() < ri->priority())
} si = ri;
} }
for (int j = 0; j < labels.size(); j++) { for (int j = 0; j < labels.size(); j++) {
const Style::TextRender *ri = labels.at(j); const Style::TextRender *ri = labels.at(j);
if (ri->rule().match(path.path->closed, path.path->tags)) { if (ri->rule().match(path.path->closed, path.path->tags)) {
if ((lbl = label(ri->key(), path.path->tags))) { if ((lbl = label(ri->key(), path.path->tags))) {
if (!si || si->id() == ri->symbolId()) { if (si && si->id() != ri->symbolId())
ti = ri; continue;
break;
} ti = ri;
break;
} }
} }
} }
@ -231,6 +232,15 @@ void RasterTile::processLineLabels(const QVector<PainterPath> &paths,
if (path.path->closed) if (path.path->closed)
continue; continue;
for (int j = 0; j < labels.size(); j++) {
const Style::TextRender *ri = labels.at(j);
if (ri->rule().match(path.path->closed, path.path->tags)) {
if ((lbl = label(ri->key(), path.path->tags)))
ti = ri;
break;
}
}
for (int j = 0; j < symbols.size(); j++) { for (int j = 0; j < symbols.size(); j++) {
const Style::Symbol *ri = symbols.at(j); const Style::Symbol *ri = symbols.at(j);
if (ri->rule().match(path.path->closed, path.path->tags)) { if (ri->rule().match(path.path->closed, path.path->tags)) {
@ -239,18 +249,6 @@ void RasterTile::processLineLabels(const QVector<PainterPath> &paths,
} }
} }
for (int j = 0; j < labels.size(); j++) {
const Style::TextRender *ri = labels.at(j);
if (ri->rule().match(path.path->closed, path.path->tags)) {
if ((lbl = label(ri->key(), path.path->tags))) {
if (!si || si->id() == ri->symbolId()) {
ti = ri;
break;
}
}
}
}
if (ti || si) if (ti || si)
items.append(PathText(&path, lbl, si, ti)); items.append(PathText(&path, lbl, si, ti));
} }

View File

@ -759,12 +759,6 @@ void Style::load(const MapData &data, qreal ratio)
if (!QFileInfo::exists(path) || !loadXml(path, data, ratio)) if (!QFileInfo::exists(path) || !loadXml(path, data, ratio))
loadXml(":/mapsforge/default.xml", data, ratio); loadXml(":/mapsforge/default.xml", data, ratio);
std::sort(_symbols.begin(), _symbols.end());
std::sort(_lineSymbols.begin(), _lineSymbols.end());
std::stable_sort(_pointLabels.begin(), _pointLabels.end());
std::stable_sort(_areaLabels.begin(), _areaLabels.end());
std::stable_sort(_pathLabels.begin(), _pathLabels.end());
} }
void Style::clear() void Style::clear()

View File

@ -217,9 +217,6 @@ public:
unsigned key() const {return _key;} unsigned key() const {return _key;}
int priority() const {return _priority;} int priority() const {return _priority;}
bool operator<(const TextRender &other) const
{return _priority > other._priority;}
private: private:
friend class Style; friend class Style;
@ -242,9 +239,6 @@ public:
bool rotate() const {return _rotate;} bool rotate() const {return _rotate;}
int priority() const {return _priority;} int priority() const {return _priority;}
bool operator<(const Symbol &other) const
{return _priority > other._priority;}
private: private:
friend class Style; friend class Style;