The proxies and the paint commands that name no objects stood for the Live
Paint Bucket's colors only while the bucket itself was the active tool. Two
tools that work for the bucket lost them:
- The Gradient panel's eyedropper on a stop of the bucket's gradient: the
stop was deselected as soon as the Eyedropper became active, and the click
then copied the clicked object's appearance onto the selection.
- A Cmd-click with the bucket, which the Selection tool takes: with New Art
Has Basic Appearance off, the new selection's appearance replaced the
bucket's fill and stroke.
Session::bucket_paints() now answers for the bucket, the Eyedropper armed
for a stop of its gradient (Tool::returns_to), the Selection tool lent to
either, and the actions of the Eyedropper's click that end by switching back
to the bucket. Every check that compared the tool id with the bucket's now
uses it: the proxies, the Stroke panel, the selected stop's owner, new-art
inheritance, previews and their cancel.
- The armed pick ends without sampling, and switches back to the bucket,
when its stop is no longer selected or no longer exists.
- Clicking the panel's eyedropper again while a pick is armed keeps the tool
the pick returns to.
- The Color panel's cached mixed state is keyed on bucket_paints().
- A Brush Options Key Color pick or an Image Trace ignored-color pick armed
from the bucket is not a stop pick.
Tests: live_paint_bucket_keeps_its_colors_through_the_stop_eyedropper_and_a_cmd_click
(engine), the stop option test (tools), the stop eyedropper and mixed
selection tests (ui-egui). Docs: docs/mcp.md, the Live Paint Bucket
paragraph.
still_wait started its STILL_SECS wait again whenever the cache key
asked for changed, and the key holds the document's revision. After a
heavy document's view moved and stopped while a drag went on editing
it, each edit was drawn into the frame shown and restarted the wait,
so the canvas never rendered whole for the view while the edits went
on. The wait now starts again only when the document or the view
(zoom, centre, size, pixel density, rotation, Pixel Preview's pixels)
changes. The checks that render at once when more than the view
differs from the frame shown are unchanged.
Refs #8688
In the web build (no render worker), while the view of a document whose
last render took more than 8 ms moves, the canvas draws the last frame
moved with the view and renders once the view is still. An edit in
that time rendered the whole canvas at the new view, every frame: a
tool drag held at an edge of the canvas (#8551) or a wheel scroll during
a drag did that on each step.
Such an edit is now drawn into the frame shown, at the view it was
rendered for: only the part the edit changed (changed_pixels). The
frame stays drawn reprojected and renders whole once the view has been
still for STILL_SECS, as for a view change without an edit. An edit
that changes more than half of the frame, or one while more than the
view and the document change, renders whole at once as before. The
partial redraw of draw_frame moves into draw_changed, shared by both.
Fixes#8688