mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-01 05:37:23 -06:00
Actions: Delete Selection's question deletes the asked sets by id
Each action set now has an id of its own, assigned when the set is made (Default Actions, New Set, Begin Recording on an empty panel) and when it is loaded from the saved preferences. The id is not saved. The question Delete Selection asks about sets holds their ids, and ui.actionSet.delete takes ids in place of all: OK deletes the asked sets wherever they are now, and deletes nothing when one of them no longer exists. Before, the question matched sets by the list of names, so with two sets of the same name, or a new set made under the asked one's name while the question was open, OK could delete a set it did not ask about.
This commit is contained in:
+4
-3
@@ -1650,10 +1650,11 @@ already walks Image Trace. Short agent entry points:
|
||||
is one of the format's extensions (`.svg` and `SVG` give `.svg`, `.JPEG` gives `.jpeg`), and otherwise in the
|
||||
format's first extension (`png8` gives `.png`, `template` gives `.vctemplate`). A step without `format` keeps the
|
||||
source file's extension (`.vectorcraft` over data sets).
|
||||
- Action sets: `ui.actionSet.delete {sets?: [index], all?: [name]}` deletes the Actions panel's sets at these indexes
|
||||
- Action sets: `ui.actionSet.delete {sets?: [index], ids?: [id]}` deletes the Actions panel's sets at these indexes
|
||||
(0 is the top set) with their actions, by default the current set, and returns `{deleted}`. An index past the last
|
||||
set is an error, and then no set is deleted. With `all`, the names of every set in the panel, in order, must equal
|
||||
it exactly; otherwise the command returns an error and deletes no set. A recording into a deleted set stops and keeps no steps; a recording into another set
|
||||
set is an error, and then no set is deleted. `ids` holds the panel's own set ids, which its question passes: the
|
||||
sets with these ids are deleted wherever they are now and `sets` is not read; when one of them no longer exists, the
|
||||
command returns an error and deletes no set. A recording into a deleted set stops and keeps no steps; a recording into another set
|
||||
goes on in that set. The panel's Delete Selection (the trash button and the panel menu's Delete) asks before it runs
|
||||
this for the selected sets, and Shift-click on a set's name selects the sets from the current one to it. Undo does
|
||||
not restore a deleted set.
|
||||
|
||||
Reference in New Issue
Block a user