mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 02:07:36 +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:
|
for colour in colours:
|
||||||
ifcopenshell.util.element.remove_deep2(file, colour)
|
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:
|
for element in styled_items:
|
||||||
if not element.Item or element.Item in to_delete:
|
if not element.Item or element.Item in to_delete:
|
||||||
file.remove(element)
|
file.remove(element)
|
||||||
|
|||||||
Reference in New Issue
Block a user