mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
prevent reloading reference annotations on loading .ifc #4478
1) if reference annotation was changed, it would reload discarding the changes 2) even if reference annotation wasn't changed it would still reload them producing noise in .ifc changes
This commit is contained in:
@@ -388,11 +388,11 @@ def sync_references(ifc, collector, drawing_tool, drawing=None):
|
||||
should_delete_existing_annotation = False
|
||||
should_create_annotation = False
|
||||
|
||||
# remove annotation only if the reference object was changed
|
||||
# otherwise we rely on the existing annotation
|
||||
if annotation:
|
||||
if reference_obj and (ifc.is_moved(reference_obj) or ifc.is_edited(reference_obj)):
|
||||
should_delete_existing_annotation = True
|
||||
elif not reference_obj:
|
||||
should_delete_existing_annotation = True
|
||||
|
||||
if (should_delete_existing_annotation or not annotation):
|
||||
should_create_annotation = True
|
||||
|
||||
Reference in New Issue
Block a user