forked from 1b-agent/opencadstudio-upstream
Add versioned scripting host model and entity coverage
This commit is contained in:
1 parent
ec2271fc9c
commit
11d5614991
22 files changed
+1015
-4
No files matched your search
@@ -525,6 +525,9 @@ impl Scene {
|
||||
let Some(existing) = self.document.get_entity(handle) else {
|
||||
return false;
|
||||
};
|
||||
// IPC snapshots omit storage-only payloads (notably Unknown/Extended
|
||||
// entities). Preserve them when replacing a clone from a plugin.
|
||||
entity.preserve_storage_data_from(existing);
|
||||
// The caller edited a snapshot copy; keep the live entity in its block.
|
||||
entity.common_mut().owner_handle = existing.common().owner_handle;
|
||||
|
||||
|
||||
@@ -144,6 +144,16 @@ impl Scene {
|
||||
self.bump_selection_set();
|
||||
}
|
||||
|
||||
/// Script-facing replacement: preserve exactly the validated input order.
|
||||
/// UI picks still use `select_entity` and its leader/annotation expansion.
|
||||
pub(crate) fn replace_selection_exact(&mut self, handles: &[Handle]) {
|
||||
if self.selected_handles_in_order() == handles { return; }
|
||||
self.selected_constraint = None;
|
||||
self.selected = handles.iter().copied().collect();
|
||||
self.selected_order = handles.to_vec();
|
||||
self.bump_selection_set();
|
||||
}
|
||||
|
||||
pub fn select_all_visible(&mut self) -> usize {
|
||||
let block = self.interaction_block_handle();
|
||||
let frozen: Option<HashSet<Handle>> = self
|
||||
|
||||
Reference in new issue
Block a user