From f8bde14fe72084b56eaa77707009ca759254bd62 Mon Sep 17 00:00:00 2001 From: Konstantin Pastbin Date: Mon, 19 Jun 2023 09:19:27 +0300 Subject: [PATCH] [qt] Show Layer= in feature's place page Signed-off-by: Konstantin Pastbin --- indexer/map_object.cpp | 1 + indexer/map_object.hpp | 2 ++ qt/place_page_dialog.cpp | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/indexer/map_object.cpp b/indexer/map_object.cpp index 1c170d284d..43b7f684d5 100644 --- a/indexer/map_object.cpp +++ b/indexer/map_object.cpp @@ -63,6 +63,7 @@ void MapObject::SetFromFeatureType(FeatureType & ft) m_roadShields = ftypes::GetRoadShieldsNames(ft); m_featureID = ft.GetID(); m_geomType = ft.GetGeomType(); + m_layer = ft.GetLayer(); if (m_geomType == feature::GeomType::Area) assign_range(m_triangles, ft.GetTrianglesAsPoints(FeatureType::BEST_GEOMETRY)); diff --git a/indexer/map_object.hpp b/indexer/map_object.hpp index cf5989ad78..a986059a34 100644 --- a/indexer/map_object.hpp +++ b/indexer/map_object.hpp @@ -100,6 +100,7 @@ public: bool IsPointType() const; feature::GeomType GetGeomType() const { return m_geomType; }; + int8_t GetLayer() const { return m_layer; }; /// @returns true if object is of building type. bool IsBuilding() const; @@ -123,6 +124,7 @@ protected: feature::Metadata m_metadata; feature::GeomType m_geomType = feature::GeomType::Undefined; + int8_t m_layer = feature::LAYER_EMPTY; }; } // namespace osm diff --git a/qt/place_page_dialog.cpp b/qt/place_page_dialog.cpp index fa84d7cf99..9f2a8fc2d9 100644 --- a/qt/place_page_dialog.cpp +++ b/qt/place_page_dialog.cpp @@ -81,6 +81,10 @@ PlacePageDialog::PlacePageDialog(QWidget * parent, place_page::Info const & info addEntry("Raw Types", DebugPrint(info.GetTypes())); } + auto const layer = info.GetLayer(); + if (layer != feature::LAYER_EMPTY) + addEntry("Layer", std::to_string(layer)); + using PropID = osm::MapObject::MetadataID; if (auto cuisines = info.FormatCuisines(); !cuisines.empty())