X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/d0e45c7c8e85c5536970fc0ac98f5f9626ebf3c8..773ef195d42f74ef20fb59f5baf6262102e6ab38:/app/models/relation.rb diff --git a/app/models/relation.rb b/app/models/relation.rb index 202db12da..f55711a69 100644 --- a/app/models/relation.rb +++ b/app/models/relation.rb @@ -384,7 +384,9 @@ class Relation < ActiveRecord::Base changed_members.collect { |type, _id, _role| type == "Relation" } .inject(false) { |acc, elem| acc || elem } - update_members = if tags_changed || any_relations + # if the relation is being deleted tags_changed will be true and members empty + # so we need to use changed_members to create a correct bounding box + update_members = if visible && (tags_changed || any_relations) # add all non-relation bounding boxes to the changeset # FIXME: check for tag changes along with element deletions and # make sure that the deleted element's bounding box is hit.