From a9927911fc54bdb20e71e0a8deaae6dc6cba9f15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 13 Nov 2024 17:15:26 +0100 Subject: [PATCH] Yet another area labels layout algorithm change --- src/map/mapsforge/rastertile.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/map/mapsforge/rastertile.cpp b/src/map/mapsforge/rastertile.cpp index a62edade..604a1014 100644 --- a/src/map/mapsforge/rastertile.cpp +++ b/src/map/mapsforge/rastertile.cpp @@ -205,17 +205,14 @@ void RasterTile::processAreaLabels(const QVector &paths, const QColor *color = p.ti ? &p.ti->fillColor() : 0; const QColor *hColor = p.ti ? haloColor(p.ti) : 0; - QPainterPath rp; - rp.addRect(_rect); QPointF pos = p.p->path->labelPos.isNull() - ? centroid(p.p->pp & rp) : ll2xy(p.p->path->labelPos); + ? 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() && _rect.contains(item->boundingRect().toRect()) - && rectNearPolygon(p.p->pp, item->boundingRect()) + if (item->isValid() && rectNearPolygon(p.p->pp, item->boundingRect()) && !item->collides(textItems)) { textItems.append(item); if (p.ti && p.lbl)