Align: Object › Align follows Align To, and the choice is kept across restarts

Object › Align ran object.align without to, so it aligned to the key
object while there was one and otherwise to the selection. With Align
to Artboard chosen it aligned two objects to the selection's bounds,
and it left a single selected object where it was, while the align
buttons of the Align panel, the Control bar and the Properties panel
move that object to the active artboard. The Align To choice was kept
in egui's temporary memory, so it went back to Align to Selection at
each launch, and ui.inspect did not report it.

The choice is now the UiState field align_to, which the desktop app
saves with its preferences and ui.inspect reports. A saved value other
than "artboard" reads as Selection, and the other preferences still
load. Object › Align now sends the to that the align buttons send: the
artboard when one object is selected, else the key object while there
is one, else the Align To choice. With anchor points selected it sends
its parameters as before, and the points align to their own bounds.
While one object is selected, the Align To row shows Artboard. Agents'
object.align calls without to keep the engine's default.

Docs: docs/control-protocol.md, docs/target-app-parity.md.
This commit is contained in:
dotCooCoo authored and bflatastic committed 2026-10-12 15:17:06 +07:00
1 parent c85570c8b2
commit 44685d8798
5 files changed
+167 -27

No files matched your search

+8
View File
@@ -366,6 +366,14 @@ Use Preview Bounds: the Align panel flyout's Use Preview Bounds item shows and t
preference (`prefs.set`); while it is on, the bounding box and the Transform panel, Properties and Control bar
fields measure visual bounds.
Align To: the Align panel's Align To choice is saved with the preferences, and `ui.inspect` reports it as
`ui.align_to` (`"selection"` or `"artboard"`; Align to Key Object stores no choice). The align buttons of the Align
panel, the Control bar and the Properties panel run `object.align` with `to: "artboard"` when one object is selected,
else with `"key"` while the selection has a key object, else with that choice. The Object → Align items send the same
`to` while every selected object is selected whole. With direct-selected anchor points or segments they send no `to`,
and the points align to their own bounds. `object.align` from `engine.execute` or `ui.menu.invoke` without `to` keeps
the engine's default: the key object while there is one, else the selection.
Width Point Edit: double-clicking a width point with the Width tool, or `ui.widthPointEdit {id, index}`, opens the
`widthPoint` dialog (fields `id`, `index`, `t`, `side1` and `side2`: the left and right widths in points, `linked`,
`adjustAdjoining`). `ui.dialog.confirm` runs `stroke.widthPoint.set` with them; `ui.dialog.set {field: "discard",