mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-13 15:25:16 +00:00
Layers: deleting layers that hold art asks first
The Layers panel's trash button, rows dropped on it, the panel menu's Delete Selection, and Delete or Backspace on highlighted rows now run ui.layerDelete. When a layer or sublayer among the rows holds art (hidden, locked and nested objects count; guides do not), a confirm dialog asks first. OK deletes the rows it asked about, by id, in the document it was asked in, as one undo step; Cancel keeps them. Empty layers, guide-only layers and object or group rows alone are deleted at once. layer.delete itself is unchanged and never asks.
This commit is contained in:
@@ -140,6 +140,9 @@ of another kind, it moves.
|
||||
|
||||
Confirmations: deleting swatches from the Swatches panel opens a `confirm` dialog (fields `message`, `detail`);
|
||||
`ui.dialog.confirm` runs the command it asks about (here `swatch.delete`) and `ui.dialog.cancel` drops it.
|
||||
Deleting Layers panel rows that include a layer or sublayer with art (`engine.execute` of `ui.layerDelete`, which the
|
||||
panel's trash, its menu's Delete Selection and Delete or Backspace run) opens a `confirm` dialog too; its OK deletes
|
||||
those rows with `layer.delete` in the document the question was asked in. `layer.delete` itself deletes at once.
|
||||
|
||||
New swatches and colour groups: `ui.newSwatch {spot?, global?, group?}` opens the `newSwatch` dialog prefilled from the active
|
||||
fill or stroke (fields as in `swatchOptions` plus `group`; a gradient or pattern only takes `name`) and
|
||||
|
||||
Reference in New Issue
Block a user