forked from 1b-agent/opencadstudio-upstream
Merge pull request #1210 from Ramox81/codex/fix-split-replacement-handles-20260911
This commit is contained in:
commit
3ab9e25d53
1 file changed
+6
-1
@@ -1292,8 +1292,13 @@ impl OpenCADStudio {
|
|||||||
// refreshes dependent render caches without erase notifications.
|
// refreshes dependent render caches without erase notifications.
|
||||||
if self.tabs[tab].scene.update_entity(entity) { vec![handle] } else { Vec::new() }
|
if self.tabs[tab].scene.update_entity(entity) { vec![handle] } else { Vec::new() }
|
||||||
} else {
|
} else {
|
||||||
|
let owner = self.tabs[tab].scene.document.get_entity(handle).map(|entity| entity.common().owner_handle);
|
||||||
self.tabs[tab].scene.erase_entities(&[handle]);
|
self.tabs[tab].scene.erase_entities(&[handle]);
|
||||||
entities.into_iter().map(|entity| self.tabs[tab].scene.add_entity(entity)).collect()
|
entities.into_iter().map(|mut entity| {
|
||||||
|
entity.common_mut().handle = Handle::NULL;
|
||||||
|
if let Some(owner) = owner { entity.common_mut().owner_handle = owner; }
|
||||||
|
self.tabs[tab].scene.add_entity(entity)
|
||||||
|
}).collect()
|
||||||
};
|
};
|
||||||
for &updated in &handles {
|
for &updated in &handles {
|
||||||
if matches!(self.tabs[tab].scene.document.get_entity(updated), Some(acadrust::EntityType::Dimension(_))) {
|
if matches!(self.tabs[tab].scene.document.get_entity(updated), Some(acadrust::EntityType::Dimension(_))) {
|
||||||
|
|||||||
Reference in new issue
Block a user