mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Fix remove_representation error #6059
After to_delete was explicitly added as an attribute to ifcopenshell.file (previously it was kind of hacky assigned during batch remove).
This commit is contained in:
@@ -66,7 +66,7 @@ def remove_representation(file: ifcopenshell.file, representation: ifcopenshell.
|
||||
for colour in colours:
|
||||
ifcopenshell.util.element.remove_deep2(file, colour)
|
||||
|
||||
to_delete = getattr(file, "to_delete", ())
|
||||
to_delete = file.to_delete or set()
|
||||
for element in styled_items:
|
||||
if not element.Item or element.Item in to_delete:
|
||||
file.remove(element)
|
||||
|
||||
Reference in New Issue
Block a user