mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 17:56:50 -06:00
These Object commands edited the document even when nothing changed, so the call recorded an undo step, emptied Redo and marked the document modified: - object.align, object.distributeSpacing and object.distribute (three or more objects) when no object moves. With one object selected, Object › Align aligns it to its own bounds, so it recorded a step every time. Calls on objects that were already aligned or evenly spaced also recorded a step, including objects that an earlier Align or Distribute left a rounding error away from the position the next call computes. - Move, Rotate, Scale, Shear, Transform and Nudge by an identity transform without a copy, Transform Again after one, Set Bounds with the current position and size, and a Selection tool drag that ends where it started. - Nudge by 0 with anchors direct-selected or with only ruler guides selected, and Transform with nothing selected or with ids that name no object, with or without a copy. - Bring to Front and Bring Forward on objects already in front, Send to Back and Send Backward on objects already at the back, and Send to Current Layer on objects already on top of the current layer. - Ungroup, Release Compound Path and Release Clipping Mask with none of their objects selected, and Expand Shape with no live shape selected. - Lock with every selected object already locked, Hide with every one already hidden, Unlock All with nothing locked and Show All with nothing hidden. - object.setProps with the values the objects already have, or with no object. - object.setLiveShape with the values the shape already has: a polygon's sides, angle, radius or equal sides, or a side length that gives exactly its current radius; an ellipse's pie, including Invert Pie on a whole ellipse; and a corner radius or kind that the corners already have. These commands now return without editing the document, and Align and Distribute count a move of 1e-9 pt or less on both axes as none. Such a call records no undo step, keeps the step to redo and leaves the document unmodified. In these cases Ungroup no longer resets the selection, and Release Compound Path, Unlock All and Show All no longer empty it. A Transform with a copy of no object keeps the selection. Lock and Hide still deselect the objects. A Nudge by 0 no longer expands a live shape whose anchors are direct-selected. The replies have the same form as before. An identity transform still sets what Transform Again repeats. The journal still records each call, so the Actions panel records it as before. When every value given to Set Bounds is the current one, it now applies the identity transform instead of the transform computed from those values, which can differ from the identity by a rounding error on a rotated object or with Use Preview Bounds. When a drag comes back to its start, the identity preview no longer edits the document. Session::preview now advances the revision when it undoes the previous preview, so views redraw that drag. The undo and redo row of docs/mcp.md now notes that many calls that change nothing record no undo step, so undo after one undoes the step before it.