forked from 1b-agent/opencadstudio-upstream
feat(ui): bulk layer on/off, lock, freeze, transparency + Ctrl+A (#236)
The Layer Manager already applied colour/linetype/lineweight in bulk; extend that to the rest: - Visibility, lock and freeze toggles now act on every selected layer, not just the clicked row. The clicked row's new state becomes the target for all. Transparency edits apply to the whole selection too. - Clicking a linetype/lineweight combo on a row that is already part of a multi-selection no longer collapses the selection (the whole row is one mouse_area whose plain-click select would otherwise reset it), so those edits stay bulk. - Ctrl/Cmd+A selects every layer row while the Layer Manager is open, and all drawing objects otherwise. Two now-unused Scene layer-toggle helpers are removed (the handlers set the flags directly and bump once). Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
5e4e7c1020
commit
818638d3aa
5 files changed
+135
-63
No files matched your search
@@ -81,20 +81,4 @@ impl Scene {
|
||||
self.bump_selection();
|
||||
}
|
||||
|
||||
// ── Layer helpers ──────────────────────────────────────────────────────
|
||||
|
||||
pub fn toggle_layer_visibility(&mut self, name: &str) {
|
||||
if let Some(layer) = self.document.layers.get_mut(name) {
|
||||
layer.flags.off = !layer.flags.off;
|
||||
}
|
||||
self.bump_geometry();
|
||||
}
|
||||
|
||||
pub fn toggle_layer_lock(&mut self, name: &str) {
|
||||
if let Some(layer) = self.document.layers.get_mut(name) {
|
||||
layer.flags.locked = !layer.flags.locked;
|
||||
}
|
||||
// Re-tessellate so the locked-layer dim (fade) appears/clears at once.
|
||||
self.bump_geometry();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user