From 531b37bc706da91ab962e2427fe7c6d676868c2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Tue, 17 Sep 2024 21:25:17 +0200 Subject: [PATCH] Always draw the light icon of lights, not only when class data is present Some charts have the lights info in the lcl data section that we do not parse. --- src/map/IMG/rastertile.cpp | 2 +- src/map/IMG/rgnfile.cpp | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/map/IMG/rastertile.cpp b/src/map/IMG/rastertile.cpp index f4969b7d..be4b28e9 100644 --- a/src/map/IMG/rastertile.cpp +++ b/src/map/IMG/rastertile.cpp @@ -429,7 +429,7 @@ void RasterTile::processPoints(QList &points, color, hcolor, 0, ICON_PADDING); if (item->isValid() && !item->collides(textItems)) { textItems.append(item); - if (point.flags & MapData::Point::Light) + if (Style::isLight(point.type) || point.flags & MapData::Point::Light) textItems.append(new TextPointItem(pos + style->lightOffset(), 0, 0, style->light(), 0, 0, 0, 0)); } else diff --git a/src/map/IMG/rgnfile.cpp b/src/map/IMG/rgnfile.cpp index 88acd51d..62815046 100644 --- a/src/map/IMG/rgnfile.cpp +++ b/src/map/IMG/rgnfile.cpp @@ -184,8 +184,6 @@ bool RGNFile::readClassFields(Handle &hdl, SegmentType segmentType, readObstructionInfo(hdl, flags, rs, point); if (point && Style::isBuoy(point->type)) readBuoyInfo(hdl, flags, point); - if (point && Style::isLight(point->type)) - point->flags |= MapData::Point::Light; return seek(hdl, off + rs); }