diff --git a/libs/editor/xml_feature.cpp b/libs/editor/xml_feature.cpp index f5d5f2d35..2d3639f44 100644 --- a/libs/editor/xml_feature.cpp +++ b/libs/editor/xml_feature.cpp @@ -740,7 +740,8 @@ void XMLFeature::OSMBusinessReplacement(uint32_t old_type, uint32_t new_type) else SetTagValue("disused:" + std::string(key), "yes"); - SetTagValue("old_name", name); + if (!name.empty()) + SetTagValue("old_name", name); } else { diff --git a/libs/indexer/editable_map_object.cpp b/libs/indexer/editable_map_object.cpp index 9c485d5ce..2446457e0 100644 --- a/libs/indexer/editable_map_object.cpp +++ b/libs/indexer/editable_map_object.cpp @@ -89,12 +89,15 @@ vector EditableMapObject::GetEditableProperties() const bool EditableMapObject::CanMarkPlaceAsDisused() const { + if (GetEditingLifecycle() == EditingLifecycle::CREATED) + return false; + auto types = GetTypes(); types.SortBySpec(); uint32_t mainType = *types.begin(); std::string mainTypeStr = classif().GetReadableObjectName(mainType); - std::vector typePrefixes = { + constexpr string_view typePrefixes[] = { "shop", "amenity-restaurant", "amenity-fast_food",