diff --git a/src/map/mapsforge/rastertile.cpp b/src/map/mapsforge/rastertile.cpp index 5ba33d90..79a7ac12 100644 --- a/src/map/mapsforge/rastertile.cpp +++ b/src/map/mapsforge/rastertile.cpp @@ -231,8 +231,13 @@ void RasterTile::processLineLabels(const QVector &paths, void RasterTile::drawTextItems(QPainter *painter, const QList &textItems) { - for (int i = 0; i < textItems.size(); i++) - textItems.at(i)->paint(painter); + QRectF rect(_rect); + + for (int i = 0; i < textItems.size(); i++) { + const TextItem *ti = textItems.at(i); + if (rect.intersects(ti->boundingRect())) + ti->paint(painter); + } } QPainterPath RasterTile::painterPath(const Polygon &polygon, bool curve) const