From 001fa34cdd62354e218359254e63f3cafc91859d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 20 Dec 2024 14:41:23 +0100 Subject: [PATCH] Copy only explicitly defined polygon center points --- src/map/ENC/mapdata.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index 40f66e10..a0d2e63c 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -173,10 +173,13 @@ static bool polygonCb(const MapData::Poly *polygon, void *context) static bool polygonPointCb(const MapData::Poly *polygon, void *context) { QList *points = (QList*)context; - if (!((polygon->type()>>16 == BUISGL && polygon->label().isEmpty()) - || polygon->type()>>16 == PYLONS)) + uint baseType = polygon->type()>>16; + + if (!polygon->label().isEmpty() || baseType == TSSLPT || baseType == RCTLPT + || baseType == I_TRNBSN || polygon->type() == SUBTYPE(I_BERTHS, 6)) points->append(MapData::Point(polygon->type(), polygon->bounds().center(), polygon->label(), polygon->param())); + return true; }