Fix #784: validate selection IDs and report the resulting selection

This commit is contained in:
DWAA1660
2026-10-09 11:19:08 -06:00
parent 825d4fdb8b
commit 04439bb01d
5 changed files with 136 additions and 10 deletions
+9
View File
@@ -612,6 +612,15 @@ the one highlighted layer or group row, else the one selected group, else the cu
so art added later is clipped too); called again it releases the mask. It returns `{clip}`, and the Layers panel
underlines clipping-path names.
## Object selection
`select.set {ids}` replaces the selection, `select.add {ids}` adds to it, and
`select.toggle {id}` or `select.toggle {ids}` toggles each target.
Every id must be a non-negative integer naming an existing object.
A malformed or unknown id is an error naming that value; the entire selection is left unchanged.
All three commands return `{count, ids}` for the resulting selection, in selection order.
An empty array clears the selection for `select.set` and leaves it alone for Add and Toggle.
## Saved selections
Select → Save Selection… keeps the selected objects under a name, in the document: `select.save {name?}` (default