From db6e891c30e3fe4d96e6a10400d1e7a273c7731c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 7 Mar 2025 21:57:24 +0100 Subject: [PATCH] Levels overlay fixes/tweaks --- src/map/ENC/rastertile.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/map/ENC/rastertile.cpp b/src/map/ENC/rastertile.cpp index a9dbb3fa..e8c489a7 100644 --- a/src/map/ENC/rastertile.cpp +++ b/src/map/ENC/rastertile.cpp @@ -169,8 +169,13 @@ void RasterTile::drawPolygons(QPainter *painter, } else { if (style.brush() != Qt::NoBrush) { painter->setPen(Qt::NoPen); + QPainterPath path(painterPath(poly.path())); + if (poly.type() == TYPE(DRGARE)) { + painter->setBrush(Qt::white); + painter->drawPath(path); + } painter->setBrush(style.brush()); - painter->drawPath(painterPath(poly.path())); + painter->drawPath(path); } if (style.pen() != Qt::NoPen) { painter->setPen(style.pen()); @@ -413,7 +418,7 @@ QList RasterTile::fetchLevels() if (!level.isNull()) list.append(level); - if (shape(level.polygons).contains(_rect)) + if (_data.size() > 0 && shape(level.polygons).contains(_rect)) break; }