From fb0c8c8b76d080c77ab8e496d074d44f1cc0d9af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sun, 17 Nov 2024 18:16:43 +0100 Subject: [PATCH] Area labels layout/clip fix --- src/map/mapsforge/rastertile.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/map/mapsforge/rastertile.cpp b/src/map/mapsforge/rastertile.cpp index 2427e4ec..04d0314d 100644 --- a/src/map/mapsforge/rastertile.cpp +++ b/src/map/mapsforge/rastertile.cpp @@ -161,7 +161,6 @@ 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); @@ -207,17 +206,12 @@ 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 && p.lbl && set.contains(*p.lbl)) - continue; - PointItem *item = new PointItem(pos.toPoint(), p.lbl, font, img, color, hColor); if (item->isValid() && rectNearPolygon(p.p->pp, item->boundingRect()) - && !item->collides(textItems)) { + && !item->collides(textItems)) textItems.append(item); - if (p.ti && p.lbl) - set.insert(*p.lbl); - } else + else delete item; } }