Two fixes for review threads on this pull request.
The dialog sent an RGB current fill's working components without
keepModel, so in a CMYK document the engine converted the fill to CMYK.
While the shown color is left unchanged, the dialog now also sends
keepModel: true. An edited color converts to the document's model as
before.
With New Art Has Basic Appearance off and nothing selected, a preview
that drew new art took its new-art paints from that art, and the next
preview then put back the paints the interaction began with. A second
rectangle preview after a fill preview was drawn with the starting fill
instead of the previewed one. The interaction now keeps the paints from
before the inheritance and the next preview starts from them. A fill
chosen during the drag updates them too. After a failed preview, a
cancel or a commit puts back the paints the interaction began with.
The dialog shows the current fill as a display sRGB color, clamped to
the sRGB range, and converted that shown color back to working RGB when
Color was picked. In a working RGB space wider than sRGB, a saturated
fill did not convert back to itself. While the shown color is left
unchanged, the dialog now sends an RGB current fill's own working
components. Non-RGB fills and edited colors convert as before.
- Params that are not an object or null are an error on journal and
action replay as well as in a batch.
- A call without `artboards` or `all` records the artboard it filled as
`activeArtboard` for a journal replay; a recorded action leaves it out,
so playing the action fills the artboard active then.
- The command is disabled when the document has no artboards.
- Canceling a Flood Fill preview puts back the new-art paints it began
with instead of taking them from the selection.
- `keepModel: true` keeps an explicit RGB color in RGB in a CMYK
document, as paint.setFill does; it is declared in the params text,
docs/mcp.md and ROADMAP.
- A `keepModel` of null or another non-boolean is an error, and nothing
is edited.
- The command is disabled, and refused, while a group is isolated.
- A chosen color goes into the document's color model as paint.setFill
puts it, so a CMYK document gets a CMYK fill unless keepModel is set.
- Rectangles added to a template layer are not selected, as on a locked
or hidden layer.
- Flood Fill Artboards is disabled, and refused, while a symbol or a
pattern is edited, so the rectangles never land in a definition.
- Params that are not an object or null are refused, also when an
action.batch step is checked before it runs.
- The dialog keeps OK off, with a reason, when Current Fill is chosen
and there is no current fill.
- With New Art Has Basic Appearance off and nothing selected, a paint
preview that is replaced or canceled puts back the starting paints,
so two paint.swap previews commit one swap, while a preview that
takes its paints from new art it selected is tracked on its own.
- The dialog's OK button stays off, with a reason, when the layer name
matches a top-level layer that holds a clipping mask, which the
command refuses.
- A batch step takes the live fill, so paint.setFill followed by Flood
Fill Artboards in one command.batch uses the new fill.
- The OK check counts at most 255 characters after trimming, the same
limit the command applies.
- A color component too large for f32 (c: 1e308, [1e39, 0, 0], gray or
Lab out of range) read as infinite and reached the rectangles; the
command now refuses it with "bad color".
- The dialog's Color option opened on the current fill in display sRGB
and sent it as working RGB, so a document whose working RGB space is
not sRGB got a shifted color. The dialog now opens on the fill's
display color and converts the picked color back to working RGB.
- With New Art Has Basic Appearance off and nothing selected, a
previewed color gave the new rectangles' fill to the new-art paints,
and Cancel or a replaced preview kept it. Both now put back the paints
the interaction began with.
Docs: docs/mcp.md.
Object > Plug-ins > Document Tools > Flood Fill Artboards... opens a dialog
that previews on the canvas and, on OK, runs the new command
addon.document.floodFillArtboards as one undo step. The command adds an
editable rectangle exactly the size of the active artboard, of listed
artboards or of every artboard, painted with the current fill or a given
color and no stroke. The rectangles go on top of a top-level layer named
"Flood Fill" (or the name given), which is made at the bottom of the
layers when the document has none. A layer that already exists keeps its
lock and visibility, and the current layer stays as it was.
Every given value is checked: null, wrong types, an empty or too long
layer name, a color with alpha, unknown artboards, and artboards together
with all are errors. A current fill of None without a color is an error.
In a preview, the current fill is the one the preview began with.
Docs: docs/mcp.md, ROADMAP.
The Libraries panel accepted a swatch row dragged before File › Revert and added the restored swatch of that name. Membership::grabbed now refuses stale rows, for the hover marker and on release.
The Set Corners dialog did not bind its values to the host fields that
the preview reads, so after typing a radius of 7 and a lower angle of
120 the host fields still held 10 and 0. The dialog now binds its
values with Bind::bound(fields), as the Arrange dialogs do.
A script without includes whose declarations give names values the analysis
does not read came back from its first scan with `Known::unsure` set and no
names. `settle` counted that as something known and scanned the script again,
which found the same and doubled the scan's steps. The proptest
`any_bytes_are_checked_in_linear_work` shrank one such input to 104 bytes that
took 550 steps, over its bound of 536.
`settle` now keeps the first scan when it found no bound names and no File
objects: the flag comes from the script's own declarations, which the first
scan already read.
A script whose only finding about its variables was that a name in
brackets is not one literal (o[k]) was scanned a second time. That
finding comes from the names the script declares, which the first scan
has already read, so the second scan gave the same report and added up
to three steps a byte. A 104-byte input of single-character tokens took
550 steps against the 536 the property test allows.
The check now repeats a scan only when a variable holds a member chain
or a File or Folder object. The property tests take their bound from
the number of scans: five steps a byte for a script scanned once, and
seventeen for one scanned up to five times.
The All and Range radios under the artboard check box of the .ai,
VectorCraft and EPS save options, and EPS's Transparent and Opaque
radios, were radio rows with an empty name, which the form draws as an
empty caption: a blank band about one row tall above the radios. Both
rows now use stacked options, so the radios follow the row above them.
The Transparent/Opaque row carries the option's label as the group's
accessible name.
A sliver at 0% opacity, or inside a group or layer at 0% opacity, paints
nothing, so Clean Up and Select > Object > Hairline Slivers now skip it.
The params text and docs/mcp.md say so, and docs/mcp.md also names what a
group or compound path used as a clipping path holds among the objects
both commands leave.
The menus' state key took the pass number of a frame with a click or a
key press, and no number on other frames. The key therefore changed on
the frame after a press and again on the frame after that, and each
change built every row's state again: two rebuilds for one key press.
The key now keeps the pass of the last frame with a pointer button
pressed or released or a key pressed, so each of them changes it once.
A pointer release counts because a click ends there.
Test: menus::tests::a_key_press_rebuilds_the_menus_once counts the
rebuilds over a key press and the four frames after it: 1, and 2
without the change.