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:
Andrej730
2024-04-01 17:06:20 +05:00
parent 42ecd7e127
commit c2623e5dce
+2 -2
View File
@@ -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