update all relation parents of an entity, fixes #10342

this had regressed in 5f1e405 – if an entity had two or more parent relations, the loop would abort after the first parent relation because `memo[entity.id]` would be set to true in the first parent iteration. what we want is to only abort if the same `relation` is seen again (in a r123 [-> …] -> r123 cirular relationship)
This commit is contained in:
Martin Raifer
2024-07-25 18:13:27 +02:00
parent f7f3607b4e
commit e66cab06eb
2 changed files with 4 additions and 2 deletions
+2
View File
@@ -55,6 +55,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
* Only consider features with either `landuse`, `natural`, `amentiy` or `leisure` tag to be classified as _Landuse_ areas
* Fix address field overwriting existing data when switching selected map features under certain circumstances ([#10260])
* Show `name` field also when only a localized name is present (e.g. only `name:xy`, but not `name`) and the preset does not show the name field by default ([#10323], thanks [@samhoooo])
* Fix bug which in some cases prevented the list of relations in _raw membership editor_ from showing all relations in the visible map area ([#10342])
#### :earth_asia: Localization
* Add address format for Thailand ([#10291], thanks [@cmoffroad])
#### :hourglass: Performance
@@ -78,6 +79,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
[#10291]: https://github.com/openstreetmap/iD/pull/10291
[#10302]: https://github.com/openstreetmap/iD/issues/10302
[#10323]: https://github.com/openstreetmap/iD/issues/10323
[#10342]: https://github.com/openstreetmap/iD/issues/10342
[@zbycz]: https://github.com/zbycz
[@samhoooo]: https://github.com/samhoooo
[@cmoffroad]: https://github.com/cmoffroad
+2 -2
View File
@@ -76,8 +76,8 @@ export function coreTree(head) {
});
head.parentRelations(entity).forEach(function(relation) {
if (memo[entity.id]) return;
memo[entity.id] = true;
if (memo[relation.id]) return;
memo[relation.id] = true;
if (_bboxes[relation.id]) {
removeEntity(relation);
insertions[relation.id] = relation;