Files
photocraft/docs
52c1e211d1 Integration: one undo step per Color panel gesture, no Move tool recolouring (#5842)
A drag in the Color panel's field or sliders only reaches the panel after
its press frame (egui decides click vs drag on a later frame), so
`continuing()` was always true on a drag's first pick and the drag reused
the previous pick's history key: a swatch, click or earlier drag followed
by a drag became one undo step. The key is now the pointer's press time,
as `type_tool::drag_key` does; swatches, the Color Picker and clicks get
a fresh key. The kittest `color_panel_gestures_recolour_the_selected_shape_in_separate_steps`
drives real clicks and drags (the first drag joined the click's step
before). CodeRabbit flagged this on the PR.

The R, G, B, HSB and hex fields apply every keystroke, so typing "128"
into G with a shape selected left three undo steps (1, 12, 128). While
no button is held, picks now share the focused field's step; a focus
counter (`track_focus`, run by the panel each frame) makes a value typed
after refocusing a field a new step, and a click (a release frame) is
always its own; a sum (`2*64`) committed by Enter, after the field let go
of the focus, keeps the step of the field focused last frame. Pinned by `typing_an_rgb_value_recolours_the_selected_shape_in_one_step`
(5 steps instead of 3 for "128" before).

With the Move tool (the default tool), Photoshop only changes the
foreground when a colour is picked; the PR recoloured the selected type
and shapes too, so a colour picked to paint with later rewrote them. The
Move tool now joins `other_tools_only_change_the_foreground`.

Co-authored-by: baz <57290335+bazmarth@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 16:25:52 +02:00
..
…
…