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

Added missing label text checks

This commit is contained in:
Martin Tůma 2024-10-29 00:35:41 +01:00
parent 86b85e5afc
commit 3ec36336c1

View File

@ -200,7 +200,7 @@ void RasterTile::processAreaLabels(const QVector<PainterPath> &paths,
QPointF pos = p.p->path->labelPos.isNull()
? centroid(p.p->pp) : ll2xy(p.p->path->labelPos);
if (p.ti && set.contains(*p.lbl))
if (p.ti && p.lbl && set.contains(*p.lbl))
continue;
PointItem *item = new PointItem(pos.toPoint(), p.lbl, font, img, color,
@ -208,6 +208,7 @@ void RasterTile::processAreaLabels(const QVector<PainterPath> &paths,
if (item->isValid() && _rect.contains(item->boundingRect().toRect())
&& !item->collides(textItems)) {
textItems.append(item);
if (p.ti && p.lbl)
set.insert(*p.lbl);
} else
delete item;