object.blend.options wrote the first selected blend's spacing, orientation,
type, ramp and shift onto every selected blend, whatever the call gave. Each
blend now takes only the values given and keeps its own for the rest, through
one closure used for the selection and for `id`.
- `id` edits that blend alone. A hidden or locked blend and an object that
is not a blend are errors, and the blend's own spine decides whether
easing is allowed.
- A call that changes no blend records no undo step.
- The Blend panel's Ramp and Shift sliders share one helper: a drag
previews on the canvas and records one undo step on release, instead of
one per frame.
Builds on #8022 by ruchirguitar.
Docs: docs/mcp.md, docs/target-app-parity.md.
select.anchorsMany, which the Direct Selection and Group Selection
marquees, the Lasso and Smart Pen send, checked and changed membership
through Selection::contains, add and remove for each item, each a scan
of the selected objects. It now keeps the selected objects in a map
while the items run and writes them back once. The objects, their
order, the anchors, segments, key, key anchor and the other selection
fields come out as before, repeated ids and ids deselected and
selected again included.
Tests compare the result with the item-by-item loop for every mode,
four starting selections and fifteen item lists, and bound the passes
over the selected objects. An ignored benchmark times both loops on
2,000, 20,000 and 50,000 rectangles.
A graphic style dragged from the panel onto the New Graphic Style button
runs Duplicate Graphic Style. The button takes the drop with no art
selected and is outlined while a style is held over it. A dragged style
that is highlighted brings the other highlighted styles, copied in panel
order in one undo step, and the copies are highlighted.
graphicStyle.duplicate now adds the copy at the end of the list instead
of right after its source, for the panel menu's command and the drop.
The list's drop zone no longer reaches over the footer when the list is
shorter than 220 pt, so a style released on New Graphic Style or Delete
is not moved to the end of the list.
A symbol drag from the Symbols panel keeps the document it started in. A drop on New Symbol after another document became active, even one with a symbol of the same name, makes no copy.
Clear with `ids`, which Cut uses for the objects it copied, removed each
id from the selection with its own scan of the selected objects. It now
calls Selection::remove_all once, which gives the same selection.
With 50,000 objects selected and all of them cut, the selection step
takes 5.5 ms instead of 572 ms (release build, median of 7 wall-clock
runs, measured while other builds were running). The new tests compare
the result with removing each id in turn, including Undo and Redo, and
an ignored benchmark times both.
The harmony strip and the variation cells start a paint drag with the
primary button. The drag carries the grabbed color as the cell shows it
(snapped to the Limit to Library colors), and the Swatches panel's
existing drop makes a swatch of it with swatch.new: one undo step, the
color's own model, a drop on a color group joins that group, and a color
that is already a swatch is added again under another name. Starting a
drag does not apply the color or change the base or the selected cells,
and a plain click still applies the color as before.