Layers: Alt-click selects only on the drawn name, and in an isolated layer

An Alt-click right of a short layer name, inside the wider rename
target, no longer replaces the selection. The isolated layer's own row
now selects the art inside it (layer.selectAll), where it cleared the
selection before. The doc line says the click selects visible, unlocked
art and clears the selection on a hidden or locked layer.
This commit is contained in:
dotCooCoo
2026-10-29 10:03:20 +07:00
committed by bflatastic
parent ec988442b5
commit 71a67601a5
5 changed files with 35 additions and 3 deletions
+3 -1
View File
@@ -673,7 +673,9 @@ fn select_art(s: &mut Session, p: &Value) -> Result<Value> {
let add = switch_or(p, "add", false, C)?;
let st = s.doc()?;
let n = st.doc.node(id).ok_or(EngineError::NoNode(id))?;
let ids: Vec<NodeId> = if !st.doc.is_editable(id) || !in_isolation(&st.doc, st.isolation, id) {
// An isolated layer's own row selects the art inside it.
let isolated_layer = st.isolation == Some(id) && n.is_layer();
let ids: Vec<NodeId> = if !st.doc.is_editable(id) || !(isolated_layer || in_isolation(&st.doc, st.isolation, id)) {
vec![]
} else if n.is_layer() {
n.layer_art(true)