diff options
author | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2016-06-30 15:02:54 +0300 |
---|---|---|
committer | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2016-07-01 09:46:40 +0300 |
commit | cd6792e04d95b30d9f4669f59f08aa99794d4b11 (patch) | |
tree | cce644dfec69dc7be9b336ed1a921a6ad874a665 /map | |
parent | 517c506328c3e2c5504178cd59a65ddfc320b9cd (diff) |
Added displaying of hotel info if any hotel is selected
Diffstat (limited to 'map')
-rw-r--r-- | map/framework.cpp | 4 | ||||
-rw-r--r-- | map/place_page_info.cpp | 2 | ||||
-rw-r--r-- | map/place_page_info.hpp | 3 |
3 files changed, 7 insertions, 2 deletions
diff --git a/map/framework.cpp b/map/framework.cpp index dc6c25fa10..2f5fdf7978 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -757,6 +757,7 @@ void Framework::FillInfoFromFeatureType(FeatureType const & ft, place_page::Info if (ftypes::IsAddressObjectChecker::Instance()(ft)) info.m_address = GetAddressInfoAtPoint(feature::GetCenter(ft)).FormatHouseAndStreet(); + info.m_isHotel = ftypes::IsHotelChecker::Instance()(ft); if (ftypes::IsBookingChecker::Instance()(ft)) { info.m_isSponsoredHotel = true; @@ -1941,7 +1942,8 @@ void Framework::ActivateMapSelection(bool needAnimation, df::SelectionShape::ESe CallDrapeFunction(bind(&df::DrapeEngine::SelectObject, _1, selectionType, info.GetMercator(), info.GetID(), needAnimation)); - SetDisplacementMode(info.m_isSponsoredHotel ? dp::displacement::kHotelMode : dp::displacement::kDefaultMode); + SetDisplacementMode(info.IsHotel() ? dp::displacement::kHotelMode + : dp::displacement::kDefaultMode); if (m_activateMapSelectionFn) m_activateMapSelectionFn(info); diff --git a/map/place_page_info.cpp b/map/place_page_info.cpp index 52edfff5c8..706f0447b1 100644 --- a/map/place_page_info.cpp +++ b/map/place_page_info.cpp @@ -16,7 +16,7 @@ bool Info::IsFeature() const { return m_featureID.IsValid(); } bool Info::IsBookmark() const { return m_bac != MakeEmptyBookmarkAndCategory(); } bool Info::IsMyPosition() const { return m_isMyPosition; } bool Info::IsSponsoredHotel() const { return m_isSponsoredHotel; } - +bool Info::IsHotel() const { return m_isHotel; } bool Info::ShouldShowAddPlace() const { auto const isPointOrBuilding = IsPointType() || IsBuilding(); diff --git a/map/place_page_info.hpp b/map/place_page_info.hpp index cd308c2c8d..ece891102e 100644 --- a/map/place_page_info.hpp +++ b/map/place_page_info.hpp @@ -29,6 +29,7 @@ public: bool IsBookmark() const; bool IsMyPosition() const; bool IsSponsoredHotel() const; + bool IsHotel() const; bool ShouldShowAddPlace() const; bool ShouldShowAddBusiness() const; @@ -80,6 +81,8 @@ public: string m_apiUrl; /// Formatted feature address. string m_address; + /// Feature is a hotel. + bool m_isHotel = false; /// Feature is a sponsored hotel. bool m_isSponsoredHotel = false; /// Sponsored feature urls. |