From ac414835309ac96b95997eba3edd846844858a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Mon, 10 Feb 2025 23:36:03 +0100 Subject: [PATCH] Handle multi key attributes --- src/map/ENC/mapdata.cpp | 4 +++- src/map/ENC/rastertile.cpp | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index 20cf6e72..41c594e2 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -329,7 +329,9 @@ MapData::Point::Point(uint type, const Coordinates &c, const Attributes &attr, else if (type == I_DISMAR) subtype = CATDIS; - _type = SUBTYPE(type, _attr.value(subtype).toUInt()); + QList list(_attr.value(subtype).split(',')); + std::sort(list.begin(), list.end()); + _type = SUBTYPE(type, list.first().toUInt()); _id = ((quint64)order(_type))<<32 | (uint)qHash(c); _label = QString::fromLatin1(_attr.value(OBJNAM)); diff --git a/src/map/ENC/rastertile.cpp b/src/map/ENC/rastertile.cpp index 91bccd5f..fe84dc3c 100644 --- a/src/map/ENC/rastertile.cpp +++ b/src/map/ENC/rastertile.cpp @@ -282,6 +282,7 @@ void RasterTile::processPoints(QList &points, attr.value(LITVIS).toUInt(), range, attr.value(SECTR1).toDouble(), attr.value(SECTR2).toDouble())); slMap.insert(point.pos()); + qDebug() << attr; } else lightsMap.insert(point.pos(), color); } else if (point.type()>>16 == FOGSIG)