diff --git a/indexer/editable_map_object.cpp b/indexer/editable_map_object.cpp index fa7bb218f2..cd689ca92b 100644 --- a/indexer/editable_map_object.cpp +++ b/indexer/editable_map_object.cpp @@ -1,6 +1,7 @@ #include "indexer/classificator.hpp" #include "indexer/cuisines.hpp" #include "indexer/editable_map_object.hpp" +#include "indexer/ftypes_matcher.hpp" #include "base/macros.hpp" @@ -9,6 +10,11 @@ namespace osm bool EditableMapObject::IsNameEditable() const { return m_editableProperties.m_name; } bool EditableMapObject::IsAddressEditable() const { return m_editableProperties.m_address; } +bool EditableMapObject::ShouldDisplayAddOrganisationButton() const +{ + return ftypes::IsBuildingChecker::Instance()(m_types); +} + vector EditableMapObject::GetEditableProperties() const { return MetadataToProps(m_editableProperties.m_metadata); diff --git a/indexer/editable_map_object.hpp b/indexer/editable_map_object.hpp index 3f4aaa2322..3649670b98 100644 --- a/indexer/editable_map_object.hpp +++ b/indexer/editable_map_object.hpp @@ -48,6 +48,7 @@ class EditableMapObject : public MapObject public: bool IsNameEditable() const; bool IsAddressEditable() const; + bool ShouldDisplayAddOrganisationButton() const; vector GetEditableProperties() const; // TODO(AlexZ): Remove this method and use GetEditableProperties() in UI.