fix(copy): a copy reacts only to what was copied with it

COPY and PASTE kept the source's reactors on each copy, so a copied
dimension still pointed at the source's dimension association (and
boundary or group members at the source hatch or group). Another
application reports such a drawing as damaged and, after recovery,
moves the dimensions. A copy's reactors now follow only targets copied
with it; group copies give their members the new group's reactor; and a
drawing opened with such stray dimension reactors has them dropped.

Fixes #1645
Fixes #1649

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-10-08 08:34:49 +03:00
1 parent e2f558ae4f
commit 9adb6f59c8
6 files changed
+80

No files matched your search

+7
View File
@@ -114,6 +114,13 @@ impl Scene {
}
self.record_undo_object_before(gh, None);
}
for member in group.entities.clone() {
if let Some(entity) = self.document.get_entity_mut(member) {
if !entity.common().reactors.contains(&gh) {
entity.common_mut().reactors.push(gh);
}
}
}
self.document.objects.insert(gh, ObjectType::Group(group));
if let Some(ObjectType::Dictionary(dict)) =
self.document.objects.get_mut(&group_dict_handle)