Skip to content

Commit

Permalink
Always draw the light icon of lights, not only when class data is pre…
Browse files Browse the repository at this point in the history
…sent

Some charts have the lights info in the lcl data section that we do not
parse.
  • Loading branch information
tumic0 committed Sep 17, 2024
1 parent 87c5a25 commit 531b37b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/map/IMG/rastertile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ void RasterTile::processPoints(QList<MapData::Point> &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
Expand Down
2 changes: 0 additions & 2 deletions src/map/IMG/rgnfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 531b37b

Please sign in to comment.