diff --git a/Logic/Osm/Actions/DeleteAction.ts b/Logic/Osm/Actions/DeleteAction.ts index 70fa949dd..def0ca5bb 100644 --- a/Logic/Osm/Actions/DeleteAction.ts +++ b/Logic/Osm/Actions/DeleteAction.ts @@ -1,11 +1,11 @@ -import { OsmObject } from "../OsmObject" +import {OsmObject} from "../OsmObject" import OsmChangeAction from "./OsmChangeAction" -import { Changes } from "../Changes" -import { ChangeDescription } from "./ChangeDescription" +import {Changes} from "../Changes" +import {ChangeDescription} from "./ChangeDescription" import ChangeTagAction from "./ChangeTagAction" -import { TagsFilter } from "../../Tags/TagsFilter" -import { And } from "../../Tags/And" -import { Tag } from "../../Tags/Tag" +import {TagsFilter} from "../../Tags/TagsFilter" +import {And} from "../../Tags/And" +import {Tag} from "../../Tags/Tag" export default class DeleteAction extends OsmChangeAction { private readonly _softDeletionTags: TagsFilter @@ -29,14 +29,18 @@ export default class DeleteAction extends OsmChangeAction { super(id, true) this._id = id this._hardDelete = hardDelete - this.meta = { ...meta, changeType: "deletion" } - this._softDeletionTags = new And([ - softDeletionTags, - new Tag( - "fixme", - `A mapcomplete user marked this feature to be deleted (${meta.specialMotivation})` - ), - ]) + this.meta = {...meta, changeType: "deletion"} + if (softDeletionTags.usedKeys().indexOf("fixme") >= 0) { + this._softDeletionTags = softDeletionTags + } else { + this._softDeletionTags = new And([ + softDeletionTags, + new Tag( + "fixme", + `A mapcomplete user marked this feature to be deleted (${meta.specialMotivation})` + ), + ]) + } } public async CreateChangeDescriptions(changes: Changes): Promise { diff --git a/assets/layers/barrier/barrier.json b/assets/layers/barrier/barrier.json index 3034f5fc7..157b4e113 100644 --- a/assets/layers/barrier/barrier.json +++ b/assets/layers/barrier/barrier.json @@ -132,6 +132,7 @@ } ], "tagRenderings": [ + "images", { "question": { "en": "Can a bicycle go past this barrier?", @@ -507,5 +508,30 @@ { "width": "5" } - ] -} \ No newline at end of file + ], + "deletion": { + "softDeletionTags": { + "and": [ + "barrier=", + "bicycle=", + "foot=", + "motor_vehicle=", + "vehicle=", + "inline_skate=", + "inline_skates=", + "mofa=", + "moped=", + "moped_a=", + "moped_b=", + "bollard=", + "cycle_barrier=", + "maxwidth:physical=", + "width:separation=", + "width:opening=", + "overlap=", + "fixme=" + ] + } + + } +} diff --git a/assets/layers/doctors/doctors.json b/assets/layers/doctors/doctors.json index 8e45b9852..5f5f47b06 100644 --- a/assets/layers/doctors/doctors.json +++ b/assets/layers/doctors/doctors.json @@ -188,5 +188,6 @@ "centroid" ] } - ] -} \ No newline at end of file + ], + "deletion":true +}