mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 10:57:49 +00:00
Fix #3868. Automatic annotation references are now auto deleted if their reference is also gone.
This commit is contained in:
@@ -488,6 +488,9 @@ def sync_references(
|
||||
if (obj := ifc.get_object(element)) and ifc.is_moved(obj):
|
||||
drawing_tool.sync_object_placement(obj)
|
||||
if not (reference_element := drawing_tool.get_assigned_product(element)):
|
||||
if obj := ifc.get_object(element):
|
||||
drawing_tool.delete_object(obj)
|
||||
ifc.run("root.remove_product", product=element)
|
||||
continue
|
||||
reference_obj = ifc.get_object(reference_element)
|
||||
if reference_element not in potential_reference_elements:
|
||||
|
||||
Reference in New Issue
Block a user