1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Increase marinas rendering priority

This commit is contained in:
Martin Tůma 2022-04-11 00:59:26 +02:00
parent 8bc91c760a
commit 5041d935f0
2 changed files with 5 additions and 2 deletions

View File

@ -20,8 +20,9 @@ static quint64 pointId(const QPoint &pos, quint32 type, quint32 labelPtr)
uint hash = (uint)qHash(QPair<uint,uint>((uint)qHash( uint hash = (uint)qHash(QPair<uint,uint>((uint)qHash(
QPair<int, int>(pos.x(), pos.y())), labelPtr)); QPair<int, int>(pos.x(), pos.y())), labelPtr));
id = ((quint64)type)<<32 | hash; id = ((quint64)type)<<32 | hash;
// Make country labels precedent over city labels
if (!Style::isCountry(type)) // Increase rendering priorities for some special items
if (!Style::isCountry(type) && !Style::isMarina(type))
id |= 1ULL<<63; id |= 1ULL<<63;
return id; return id;

View File

@ -125,6 +125,8 @@ public:
{return (type >= 0x10400 && type <= 0x10401);} {return (type >= 0x10400 && type <= 0x10401);}
static bool isMarinePoint(quint32 type) static bool isMarinePoint(quint32 type)
{return type >= 0x10100 && type < 0x10a00;} {return type >= 0x10100 && type < 0x10a00;}
static bool isMarina(quint32 type)
{return type == 0x10703;}
private: private:
struct Section { struct Section {