mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-01 21:57:12 -06:00
Actions: Delete Action Sets checks the asked sets' names before deleting
The question Delete Selection asks now passes the names of the sets it names along with their indexes. ui.actionSet.delete deletes nothing and returns an error when the set at an index no longer has that name, so a set deleted or added above them while the question is open does not make OK delete a different set. An index above the platform's usize range is refused as "no such action set" instead of wrapping on 32-bit builds.
This commit is contained in:
+4
-3
@@ -1650,9 +1650,10 @@ 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]}` 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. A recording into a deleted set stops and keeps no steps; a recording into another set
|
||||
- Action sets: `ui.actionSet.delete {sets?: [index], names?: [name]}` 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 `names`, the set at each index must still have the name at the
|
||||
same position; 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
|
||||
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