mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 13:23:59 +00:00
[editor] Mark businesse as disused/vacant
Signed-off-by: map-per <map-per@gmx.de>
This commit is contained in:
@@ -668,7 +668,7 @@ void Editor::UploadChanges(string const & oauthToken, ChangesetTags tags, Finish
|
||||
{}
|
||||
|
||||
// Add tags to XMLFeature
|
||||
UpdateXMLFeatureTags(feature, journal);
|
||||
UpdateXMLFeatureTags(feature, journal, changeset);
|
||||
|
||||
// Upload XMLFeature to OSM
|
||||
LOG(LDEBUG, ("CREATE Feature (newEditor)", feature));
|
||||
@@ -686,7 +686,7 @@ void Editor::UploadChanges(string const & oauthToken, ChangesetTags tags, Finish
|
||||
XMLFeature feature = GetMatchingFeatureFromOSM(changeset, fti.m_object);
|
||||
|
||||
// Update tags of XMLFeature
|
||||
UpdateXMLFeatureTags(feature, journal);
|
||||
UpdateXMLFeatureTags(feature, journal, changeset);
|
||||
|
||||
// Upload XMLFeature to OSM
|
||||
LOG(LDEBUG, ("MODIFIED Feature (newEditor)", feature));
|
||||
@@ -1321,7 +1321,7 @@ bool Editor::IsFeatureUploadedImpl(FeaturesContainer const & features, MwmId con
|
||||
return info && info->m_uploadStatus == kUploaded;
|
||||
}
|
||||
|
||||
void Editor::UpdateXMLFeatureTags(editor::XMLFeature & feature, std::list<JournalEntry> const & journal)
|
||||
void Editor::UpdateXMLFeatureTags(editor::XMLFeature & feature, std::list<JournalEntry> const & journal, ChangesetWrapper & changeset)
|
||||
{
|
||||
for (JournalEntry const & entry : journal)
|
||||
{
|
||||
@@ -1335,6 +1335,13 @@ void Editor::UpdateXMLFeatureTags(editor::XMLFeature & feature, std::list<Journa
|
||||
}
|
||||
case JournalEntryType::ObjectCreated: break;
|
||||
case JournalEntryType::LegacyObject: ASSERT_FAIL(("Legacy Objects can not be edited with the new editor")); break;
|
||||
case JournalEntryType::BusinessReplacement:
|
||||
{
|
||||
BusinessReplacementData const & businessReplacementData = std::get<BusinessReplacementData>(entry.data);
|
||||
feature.OSMBusinessReplacement(businessReplacementData.old_type, businessReplacementData.new_type);
|
||||
changeset.AddChangesetTag("info:place_marked_as_disused", "yes");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user