1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-03-13 10:37:45 +01:00

Code cleanup

This commit is contained in:
Martin Tůma 2025-03-08 03:43:09 +01:00
parent 8ea84c5c86
commit 64b29f8aac
2 changed files with 4 additions and 8 deletions

View File

@ -266,9 +266,8 @@ void RasterTile::processPoints(const QList<Data::Point> &points,
QList<TextItem*> &textItems, QList<TextItem*> &lights,
QList<SectorLight> &sectorLights, bool overZoom) const
{
LightMap lightsMap;
SignalSet signalsSet;
QSet<Coordinates> slMap;
QMap<Coordinates, Style::Color> lightsMap;
QSet<Coordinates> signalsSet, sectorLightsSet;
int i;
/* Lights & Signals */
@ -285,7 +284,7 @@ void RasterTile::processPoints(const QList<Data::Point> &points,
sectorLights.append(SectorLight(point.pos(), color,
attr.value(LITVIS).toUInt(), range,
attr.value(SECTR1).toDouble(), attr.value(SECTR2).toDouble()));
slMap.insert(point.pos());
sectorLightsSet.insert(point.pos());
} else
lightsMap.insert(point.pos(), color);
} else if (point.type()>>16 == FOGSIG)
@ -316,7 +315,7 @@ void RasterTile::processPoints(const QList<Data::Point> &points,
TextPointItem *item = new TextPointItem(pos + offset, label, fnt, img,
color, hColor, 0, 2, rotate);
if (item->isValid() && (slMap.contains(point.pos())
if (item->isValid() && (sectorLightsSet.contains(point.pos())
|| (point.polygon() && img) || !item->collides(textItems))) {
textItems.append(item);
if (lightsMap.contains(point.pos()))

View File

@ -61,9 +61,6 @@ private:
{return lines.isEmpty() && polygons.isEmpty() && points.isEmpty();}
};
typedef QMap<Coordinates, Style::Color> LightMap;
typedef QSet<Coordinates> SignalSet;
QPointF ll2xy(const Coordinates &c) const
{return _transform.proj2img(_proj.ll2xy(c));}
QPainterPath painterPath(const Polygon &polygon) const;