From f4d101788d116f92bdc47e4c4204d09906e5e170 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Thu, 20 Feb 2025 19:18:35 +1100 Subject: [PATCH] Fix insane bug when replacing element that looped through every single element. --- src/ifcopenshell-python/ifcopenshell/util/element.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/ifcopenshell/util/element.py b/src/ifcopenshell-python/ifcopenshell/util/element.py index b8ef0711d5..524f86b8ac 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/element.py +++ b/src/ifcopenshell-python/ifcopenshell/util/element.py @@ -1333,7 +1333,7 @@ def get_referenced_elements(reference: ifcopenshell.entity_instance) -> set[ifco def replace_element(element: ifcopenshell.entity_instance, replacement: ifcopenshell.entity_instance) -> None: - for inverse in element.file: + for inverse in element.file.get_inverse(element): replace_attribute(inverse, element, replacement)