From 6e93e5b7a54b2153085096a542afccd184616607 Mon Sep 17 00:00:00 2001 From: Alexander Borsuk Date: Thu, 9 May 2024 15:58:21 +0200 Subject: [PATCH] Revert "[editor] Fixed bug overwriting existing features" This doesn't work well in several cases: https://github.com/organicmaps/organicmaps/issues/8125 This reverts commit 3c9c54eda61d84609bdcf5f298d0abb26e3f4281. Signed-off-by: Alexander Borsuk --- editor/changeset_wrapper.cpp | 5 ----- editor/changeset_wrapper.hpp | 3 --- editor/osm_editor.cpp | 6 ++---- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/editor/changeset_wrapper.cpp b/editor/changeset_wrapper.cpp index 3850840e87..7ca9f97be6 100644 --- a/editor/changeset_wrapper.cpp +++ b/editor/changeset_wrapper.cpp @@ -247,11 +247,6 @@ void ChangesetWrapper::Delete(editor::XMLFeature node) m_deleted_types[GetTypeForFeature(node)]++; } -void ChangesetWrapper::AddChangesetTag(std::string key, std::string value) -{ - m_changesetComments.emplace(std::move(key), std::move(value)); -} - std::string ChangesetWrapper::TypeCountToString(TypeCount const & typeCount) { if (typeCount.empty()) diff --git a/editor/changeset_wrapper.hpp b/editor/changeset_wrapper.hpp index e8974dfa45..2ce690b3a8 100644 --- a/editor/changeset_wrapper.hpp +++ b/editor/changeset_wrapper.hpp @@ -49,9 +49,6 @@ public: /// Throws exceptions from above list. void Delete(editor::XMLFeature node); - /// Add a tag to the changeset - void AddChangesetTag(std::string key, std::string value); - /// Allows to see exception details in OSM changesets for easier debugging. void SetErrorDescription(std::string const & error); diff --git a/editor/osm_editor.cpp b/editor/osm_editor.cpp index c0809afc49..fc8c6995e0 100644 --- a/editor/osm_editor.cpp +++ b/editor/osm_editor.cpp @@ -646,10 +646,8 @@ void Editor::UploadChanges(string const & oauthToken, ChangesetTags tags, } else { - LOG(LDEBUG, ("Create case: uploading new feature", feature)); - // There is another node nearby, but it is saver to upload a new node (#2298). - changeset.AddChangesetTag("info:feature_close_by", "yes"); - changeset.Create(feature); + LOG(LDEBUG, ("Create case: uploading patched feature", osmFeature)); + changeset.Modify(osmFeature); } } catch (ChangesetWrapper::OsmObjectWasDeletedException const &)