Skip to content

Masking: Color Range "Pick" button samples the photo - #957

Merged
bflatastic merged 1 commit into
storytold:mainfrom
emmertex:pr/color-range-pick
Oct 11, 2026
Merged

bflatastic merged 1 commit into
storytold:mainfrom
emmertex:pr/color-range-pick

Conversation

@emmertex

Copy link
Copy Markdown
Contributor

Fixes #954

Root cause: the Pick button (and the new Color Range tile) set app.ui.tool = "colorRange", but the eyedropper was handled only in general_interaction. While the Masking panel is open the loupe routes clicks to mask_overlay instead, so clicks on the photo never reached the picker and the sample count stayed at 0.

Fix: mask_overlay handles the colorRange tool (crosshair cursor; click samples, Shift-click adds, up to 5) through a shared color_range_pick helper also used by general_interaction. Clicking Pick again still ends picking. Coordinates go through the loupe CanvasMap, so crop, rotation and zoom are accounted for.

The Luminance Range mask has no picker (slider-only), so nothing to fix there.

Test: tests_masking::color_range_pick_button_samples_the_photo drives the UI headlessly: Pick, click, Shift-click, then crop + 200% zoom, where it checks that the sample matches the engine sample at the crop-centre source point. It fails before the fix ("a click samples a colour").

Sources: own design (bug fix).

🤖 Generated with Claude Code

With the Masking panel open the loupe routes clicks to mask_overlay, so the
colorRange eyedropper armed by the Pick button (handled only in
general_interaction) never ran and no sample was taken. mask_overlay now
handles the eyedropper (crosshair cursor, click samples, shift-click adds)
through a shared color_range_pick helper.

Fixes #954

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Copy link
Copy Markdown
Member

Landed in #975 (fixes #954). On merge I moved color_range_pick above mask_overlay's doc comment, so that comment stays on mask_overlay. Thank you, @emmertex! #959, #927, #948, #930, #928, #926, #946, #947 and #925 are in the next batches. #940 duplicates #786 and #924 needs a rebase (see its thread).


Generated by Claude Code

valenfys pushed a commit to valenfys/lightcraft that referenced this pull request Oct 11, 2026
… put the eyedropper between them)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BKWB9TCnvzJHV6xMLAj2J4
emmertex added a commit to emmertex/chromaforge that referenced this pull request Oct 11, 2026
mask_overlay owns loupe clicks in the Masking panel, so the colorRange
eyedropper (handled only in general_interaction) never ran. Handle it there
via a shared color_range_pick helper; headless regression test covers pick,
shift-add, crop + zoom mapping and toggling off. Upstream: storytold/lightcraft#957.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@emmertex
emmertex deleted the pr/color-range-pick branch October 13, 2026 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Masking: Color Range "Pick" button does nothing (no colour samples can be added)

2 participants