forked from organicmaps/organicmaps
[editor] ChangesetWrapper::Delete implementation.
This commit is contained in:
parent
93c26d54bd
commit
e950d0cca6
2 changed files with 13 additions and 0 deletions
|
@ -123,4 +123,14 @@ void ChangesetWrapper::Modify(XMLFeature node)
|
|||
m_api.ModifyElement(node);
|
||||
}
|
||||
|
||||
void ChangesetWrapper::Delete(XMLFeature node)
|
||||
{
|
||||
if (m_changesetId == kInvalidChangesetId)
|
||||
m_changesetId = m_api.CreateChangeSet(m_changesetComments);
|
||||
|
||||
// Changeset id should be updated for every OSM server commit.
|
||||
node.SetAttribute("changeset", strings::to_string(m_changesetId));
|
||||
m_api.DeleteElement(node);
|
||||
}
|
||||
|
||||
} // namespace osm
|
||||
|
|
|
@ -44,6 +44,9 @@ public:
|
|||
/// Node should have correct OSM "id" attribute set.
|
||||
void Modify(editor::XMLFeature node);
|
||||
|
||||
/// Throws exceptions from above list.
|
||||
void Delete(editor::XMLFeature node);
|
||||
|
||||
private:
|
||||
/// Unfortunately, pugi can't return xml_documents from methods.
|
||||
/// Throws exceptions from above list.
|
||||
|
|
Loading…
Add table
Reference in a new issue