Transform Each recorded only the document's uid when it opened. Object
ids survive File > Revert, so after a revert the dialog previewed its old
values on the restored selection, and OK or Copy applied them there.
The dialog now records the document's uid and revert count, as the
Transform dialogs do since #9797. After a revert, Preview stops, Cancel
rolls nothing back, and OK and Copy are refused with "The document was
reverted. Reopen this dialog to continue." in the dialog and on the
status line. A refused OK now sets Copy to off instead of removing the
field, so the dialog keeps showing the reason.
Each object of a host class keeps its handle twice, once in its slot and
once in the realm's index of the objects scripts hold, but creating one
reserved only the object's own bytes, and the collector's live-byte total
left the handle out. A host value with a long handle could therefore grow
the heap past the script's limit.
The object now reserves its handle's bytes before it is made, and the
collector counts them for every live object. Tests cover a handle larger
than the remaining budget and the bytes 100 retained objects add.
File > Revert keeps the document's uid and restores objects with the same
IDs, so an appearance dragged from a Layers target circle or the
Appearance panel's thumbnail before the revert was still accepted after
it, and its drop ran on the restored objects.
PanelDrag::Appearance now carries the document's revert count next to its
uid, as PanelDrag::Art does, and appearance_for(uid, reverts) returns the
source only while the destination shows the contents the drag came from.
Every drop compares the pair: a Layers target circle, the Layers trash,
the canvas (where it takes the drop and where it applies it) and the
Graphic Styles panel.
File › Open and File › Place read layered raster .pcraft documents
through craft-doc and store them as one PNG, sized by the document's
resolution. A placed file links like any image.
- The image is the file's full-size composite when it has one.
- Without one, the layers are combined at the canvas size when the
document is RGB at 8 or 16 bits and every visible layer is a raster
layer that blends Normal, with no clipping, layer effects, vector
mask, frame, advanced blending or feathered layer mask. Hidden layers
are not read, and an RGB ICC profile the document names is kept.
- Otherwise the composite preview comes in at the canvas's size, and
Open, Place, links.update, links.relink and links.replaceEmbedded
warn when it has fewer pixels than the canvas, naming both sizes and
why the layers were not combined.
- A full-size composite or preview the file names but doesn't hold,
can't decode or, for the full-size one, of another size than the
canvas is an error. The Links commands decode the kept PNG before
taking it.
The import fuzz tests cover mutated bundles and manifests.
A click on a path's direction handle picks it, a Shift-click adds it to
the picked handles or takes it away, and Escape lets them go. Picked
handles show ringed. Dragging one of two or more picked handles moves
all of them, on one path or several, by the same offset in one undo
step. A Shift-press on a handle reshapes only once the pointer has moved
3 pixels, so a Shift-click leaves the handle where it is.
The new command path.moveHandles does the move: an anchor with one
handle listed places it as path.setHandle does, an anchor with both
listed moves both and becomes a corner, and independent (Alt during the
drag) makes every listed handle's anchor a corner.
Docs: docs/mcp.md, docs/target-app-parity.md.
The Parametric Shape panel read Shape, Count, W, H, Rotation, the kind's
own values and Corner Radius with value(), which carries each proposed
value but not the value a cancel restores. With no shape selected, a W
typed and then canceled with Escape stayed as the tool option, so the
next shape drawn had the canceled width. With a shape selected, each
keystroke was its own undo step and Escape left the shape edited.
- With a shape selected, each field's gesture runs in one undo scope
(EditPath::Scope, as the Live Shape panel's fields do): Enter keeps the
edit as one undo step, and Escape reverts it.
- With no shape selected, the fields send the value they land on
(events.landed(), as the Corner and Shared Edge sections do since
#9773), so Escape restores the opening tool option.
- With no shape selected, a highlighted Shape entry applies only once it
is chosen: a new kind resets the kind's own count and values, which a
restored kind would not bring back.
- A field left empty still ends its gesture, so its undo step closes.
Docs: docs/mcp.md (Parametric Shape Tool), docs/ui-parity.md.
The selected paths a hover tries were listed group by group in selection
order, while a press tries them topmost first across the document. With two
selected groups whose anchors fall within reach, hover marked the back
group's anchor and a press took the front one. The list is now sorted in
paint order, topmost first, with a Shaper Group's original shapes included.
The Corner menus of a live rectangle's properties (one for all four
corners while Corner Radius is linked, one per corner otherwise) read
the select's current value, so a kind highlighted with the arrow keys
in the open list ran object.setLiveShape at once and recorded an undo
step, and Escape left the highlighted kind on the rectangle. The menus
now read only the committed pick, as the Corner menu of Direct-Selected
corners does since #9728. The rows are shared by the Transform panel,
the Properties panel's Transform section and the Contextual Task Bar.
The progress line now names the cases where a placed EPS file whose bytes
the editing data includes stays as on main: DCS bytes, no bounding box of
its own, a VectorCraft document, bytes that don't read as EPS, an `.ai` or
`.ait` file name, and a previewed file that an image variable binds.
A template layer stays in Preview whatever its Preview flag is, so only a
layer that is not a template and has Preview off draws placed files by the
Outline rules in Preview mode.
A command with no menu path whose params name a required field (Close
Path needs an `id`, Knife needs `points`) was still listed, and a pick
of it always failed with an error such as "missing id". The rule that
leaves out commands needing a value now applies to these commands as
well as to menu commands, so 232 more engine commands are left out (562
in all, up from 330).
Rename Artboards and the Remove Asset, Rename Asset and Set 3D Format
commands stay listed: a pick of each opens the Rename dialog or the
Asset Export panel.
Four EPS import tests asserted elapsed time (5 s, 20 s, a 20 s receive
timeout, and 1,000 copies against 5 times one copy). A busy test runner
could fail them, and a slower run that was still bounded could pass them.
Each now reads a test-only counter on its own thread:
- `]` without its `[`: the operand stack slots that `[` and `]` look at.
200,000 brackets look at no more than 4 slots each.
- The outline check: the point-to-segment distances it works out. A look
drawn 5,000 times works out no more than `MAX_OUTLINE_PAIRS`.
- Objects on a path: the paths and objects the records measure. A
thousand copies of a record measure as many as one copy.
- File fonts: the glyphs `fits` compares. A string of 250,000 of one
character makes fewer comparisons than it has glyphs.
Outside tests the counters do nothing.
View › Proof Colors, Overprint Preview and Separations Preview are one view
for the whole process, and the canvas draws through it. Canvas tests hold
`testing::DefaultProofView` to keep it fixed while they compare frames, and
`testing.rs` asks every test that sets the view to hold it too. Three tests
changed it without holding it:
- `panels::actions::tests_edits::every_listed_menu_item_runs_from_the_menu_what_its_step_holds`
and `shortcut_editor::tests::listed_commands_run_from_a_key_without_a_missing_param`
run every listed command, the View menu's proof commands included.
- `dialogs::new_document::tests::new_document_choice_enter_commits_before_create`
creates a document with Preview Mode set to Overprint, which turns on
Overprint Preview and leaves it on.
When one of them ran between two frames of a canvas test in the same test
process, the render options of the next frame no longer matched the frame
shown. An edit then rendered the whole frame instead of drawing its part, and
`canvas::tests::without_a_worker_edits_while_the_view_is_still_do_not_hold_off_the_render`
failed with "rendered whole about STILL_SECS after the view stopped: 1 frames".
Turning Overprint Preview on between two of its frames gives that failure
every time.
Live envelopes, warped type and warped images were held to one shared
difference budget measured only on the first artboard. A file whose PDF
part shows a later artboard, a page cropped to the art, or more than one
artboard could then take more difference on that page than the page
check allows, and open from its PDF part instead of its layers.
Each page the art may be compared with (every artboard, and the art's
bounding box when it is not one of them) now has its own half share of
the page check's allowance. An envelope on a later artboard that draws
away from its drawn art over that artboard's page keeps its drawn art,
where before it opened live. Art on no such page is not held to a page.
Repeated pages are held once, the page list is worked out once per
change of artboards, and an import makes at most 1,024 comparisons with
pages; art that needs more keeps its drawn art.
The Batch dialog's lists wrote the row the arrow keys highlighted into
the dialog's fields. Escape closed the list but kept that row, and OK
then ran the batch with it. The lists now bind to the fields, so Escape
restores the earlier choice and only a committed choice applies, as
New Action and Action Options do since #9730.