fix(selection): separate transient visibility
Keep object isolation out of persisted entity visibility and clear stale grips across block-editor transitions. Refs #512 Refs #517
This commit is contained in:
parent
7f41e1666f
commit
d5be78a187
10 changed files with 295 additions and 106 deletions
|
|
@ -549,7 +549,7 @@ pub(super) fn on_tab_close(&mut self, idx: usize) -> Task<Message> {
|
|||
*e = orig;
|
||||
}
|
||||
}
|
||||
self.tabs[i].scene.hidden.remove(&h);
|
||||
self.tabs[i].scene.preview_hidden.remove(&h);
|
||||
self.tabs[i].scene.clear_preview_wire();
|
||||
// Geometry restored to the backup — re-tessellate just it.
|
||||
self.tabs[i]
|
||||
|
|
|
|||
|
|
@ -821,10 +821,10 @@ pub(super) fn on_open_file(&mut self) -> Task<Message> {
|
|||
.unwrap_or_else(|| "Model".to_string()),
|
||||
};
|
||||
}
|
||||
// Rebuild the Isolate/Hide set from the entities the file itself
|
||||
// marks invisible (DXF code 60), so hidden objects stay hidden on
|
||||
// reopen and End Isolation can bring them back.
|
||||
self.tabs[i].scene.sync_hidden_from_invisible();
|
||||
// Object isolation is session-only. A newly opened drawing must
|
||||
// not inherit the previous tab's filter, and persisted entity
|
||||
// visibility remains independent (not an isolation session).
|
||||
self.tabs[i].scene.reset_transient_visibility();
|
||||
crate::io::linetypes::populate_document(&mut self.tabs[i].scene.document);
|
||||
self.tabs[i].properties = PropertiesPanel::empty();
|
||||
// Seed the current table / multileader style from the file's
|
||||
|
|
|
|||
|
|
@ -742,11 +742,11 @@ impl OpenCADStudio {
|
|||
// the whole model on every move.
|
||||
if self.grip_preview_handle != Some(grip.handle) {
|
||||
if let Some(prev) = self.grip_preview_handle.take() {
|
||||
self.tabs[i].scene.hidden.remove(&prev);
|
||||
self.tabs[i].scene.preview_hidden.remove(&prev);
|
||||
}
|
||||
// Back up the original geometry so Esc can cancel the drag.
|
||||
self.grip_original = self.tabs[i].scene.document.get_entity(grip.handle).cloned();
|
||||
self.tabs[i].scene.hidden.insert(grip.handle);
|
||||
self.tabs[i].scene.preview_hidden.insert(grip.handle);
|
||||
// Hiding changes exactly one resident run. Publishing a full
|
||||
// delta here made the first grip move rebuild every wire.
|
||||
self.tabs[i]
|
||||
|
|
@ -2016,7 +2016,7 @@ impl OpenCADStudio {
|
|||
}
|
||||
self.grip_text_verts = Vec::new();
|
||||
self.grip_text_slide = false;
|
||||
self.tabs[i].scene.hidden.remove(&h);
|
||||
self.tabs[i].scene.preview_hidden.remove(&h);
|
||||
self.tabs[i].scene.clear_preview_wire();
|
||||
// Only the dragged entity changed — re-tessellate just it.
|
||||
self.tabs[i]
|
||||
|
|
|
|||
Loading…
Reference in a new issue