mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-30 04:37:29 -06:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user