Store each comp's layer selection on its own.

A single selected_layers list kept ids from every comp, so the active comp looked selected whenever another comp was. Opening a comp and running a script against a different comp now park and restore that selection.
This commit is contained in:
Vikram Bhaskaran
2026-10-13 17:46:02 +11:00
parent 8c986a1bec
commit c46f80faa2
5 changed files with 123 additions and 23 deletions
+2 -2
View File
@@ -712,10 +712,10 @@ fn layer_selection_in_a_closed_comp_survives_to_the_next_script() {
c.layers.addText("A");
c.layers.addText("B");
c.layer("B").selected = true;
c.selectedLayers.length + " " + c.layer("B").selected
c.selectedLayers.length + " " + c.layer("B").selected + " " + a.selectedLayers.length
"#,
);
assert_eq!(out.result, json!("1 true"));
assert_eq!(out.result, json!("1 true 0"));
// A second script call, the way a panel talks to the app over the control channel.
let out = ok(
&mut s,