diff --git a/indexer/osm_editor.cpp b/indexer/osm_editor.cpp index 15d87e2600..8e8886b6c7 100644 --- a/indexer/osm_editor.cpp +++ b/indexer/osm_editor.cpp @@ -638,11 +638,6 @@ EditableProperties Editor::GetEditableProperties(FeatureType const & feature) co editable.m_metadata.push_back(field); } } - // Buildings are processed separately. - // TODO(mgsergio): Activate this code by XML config variable. - if (ftypes::IsBuildingChecker::Instance()(feature)) - editable.m_address = true; - // If address is editable, many metadata fields are editable too. if (editable.m_address) { @@ -655,6 +650,15 @@ EditableProperties Editor::GetEditableProperties(FeatureType const & feature) co editable.m_metadata.push_back(EType::FMD_POSTCODE); } + // Buildings are processed separately. + // Please note that only house number, street and post code should be editable for buildings. + // TODO(mgsergio): Activate this code by XML config variable. + if (ftypes::IsBuildingChecker::Instance()(feature)) + { + editable.m_address = true; + editable.m_metadata.push_back(EType::FMD_POSTCODE); + } + // Avoid possible duplicates. my::SortUnique(editable.m_metadata); return editable; diff --git a/indexer/osm_editor.hpp b/indexer/osm_editor.hpp index 6ddbe1e425..8676da48da 100644 --- a/indexer/osm_editor.hpp +++ b/indexer/osm_editor.hpp @@ -22,6 +22,7 @@ namespace osm struct EditableProperties { bool m_name = false; + /// If true, enables editing of house number, street address and post code. bool m_address = false; vector m_metadata; bool IsEditable() const { return m_name || m_address || !m_metadata.empty(); }