diff --git a/src/map/mapsforge/rastertile.cpp b/src/map/mapsforge/rastertile.cpp index 3fed7c6d..4e6287b8 100644 --- a/src/map/mapsforge/rastertile.cpp +++ b/src/map/mapsforge/rastertile.cpp @@ -153,6 +153,7 @@ void RasterTile::processAreaLabels(const QVector &paths, QList labels(_style->areaLabels(_zoom)); QList symbols(_style->areaSymbols(_zoom)); QList items; + QSet set; for (int i = 0; i < paths.size(); i++) { const PainterPath &path = paths.at(i); @@ -199,12 +200,16 @@ void RasterTile::processAreaLabels(const QVector &paths, QPointF pos = p.p->path->labelPos.isNull() ? centroid(p.p->pp) : ll2xy(p.p->path->labelPos); + if (p.ti && set.contains(*p.lbl)) + continue; + PointItem *item = new PointItem(pos.toPoint(), p.lbl, font, img, color, hColor); if (item->isValid() && _rect.contains(item->boundingRect().toRect()) - && !item->collides(textItems)) + && !item->collides(textItems)) { textItems.append(item); - else + set.insert(*p.lbl); + } else delete item; } }