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:
parent
86b85e5afc
commit
3ec36336c1
@ -200,7 +200,7 @@ void RasterTile::processAreaLabels(const QVector<PainterPath> &paths,
|
|||||||
QPointF pos = p.p->path->labelPos.isNull()
|
QPointF pos = p.p->path->labelPos.isNull()
|
||||||
? centroid(p.p->pp) : ll2xy(p.p->path->labelPos);
|
? 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;
|
continue;
|
||||||
|
|
||||||
PointItem *item = new PointItem(pos.toPoint(), p.lbl, font, img, color,
|
PointItem *item = new PointItem(pos.toPoint(), p.lbl, font, img, color,
|
||||||
@ -208,7 +208,8 @@ void RasterTile::processAreaLabels(const QVector<PainterPath> &paths,
|
|||||||
if (item->isValid() && _rect.contains(item->boundingRect().toRect())
|
if (item->isValid() && _rect.contains(item->boundingRect().toRect())
|
||||||
&& !item->collides(textItems)) {
|
&& !item->collides(textItems)) {
|
||||||
textItems.append(item);
|
textItems.append(item);
|
||||||
set.insert(*p.lbl);
|
if (p.ti && p.lbl)
|
||||||
|
set.insert(*p.lbl);
|
||||||
} else
|
} else
|
||||||
delete item;
|
delete item;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user