Selection-only commands take ids: the objects are selected first (#2130)

object.group, ungroup, the clipping mask and compound path Make/Release,
the Arrange commands, lock, hide, edit.duplicate, object.move, rotate,
scale, reflect, shear and the Pathfinder commands acted only on the
selection, so a script had to send select.set first. Given ids, they now
select those objects (select.set, with its checks) and run as on the
selection, in the same undo step; without ids nothing changes.
This commit is contained in:
Gert Pellin
2026-10-16 04:44:50 +07:00
committed by bflatastic
parent e6b28f0e80
commit e7aacec852
5 changed files with 310 additions and 42 deletions
+1 -1
View File
@@ -137,7 +137,7 @@ pub fn specs() -> Vec<CommandSpec> {
"Duplicate",
["Edit"],
None,
"{dx?, dy?} duplicate the selection in place (offset optional)",
"{ids?: [id…] (selected first; default: the selection), dx?, dy?} duplicate the selection in place (offset optional)",
has_selection,
duplicate
),