Repository navigation
Masking: Color Range "Pick" button samples the photo - #957
Merged
Merged
Conversation
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>
Member
|
Landed in #975 (fixes #954). On merge I moved 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #954
Root cause: the Pick button (and the new Color Range tile) set
app.ui.tool = "colorRange", but the eyedropper was handled only ingeneral_interaction. While the Masking panel is open the loupe routes clicks tomask_overlayinstead, so clicks on the photo never reached the picker and the sample count stayed at 0.Fix:
mask_overlayhandles thecolorRangetool (crosshair cursor; click samples, Shift-click adds, up to 5) through a sharedcolor_range_pickhelper also used bygeneral_interaction. Clicking Pick again still ends picking. Coordinates go through the loupeCanvasMap, 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_photodrives 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