]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/relation.rb
Merge remote-tracking branch 'upstream/pull/2164'
[rails.git] / app / models / relation.rb
index 202db12daa66479f379c4aeb84e49122279b1991..f55711a69bb75b060ae7a0ec61a120afbf852657 100644 (file)
@@ -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.