Bug 478190

Summary: Color Sampler doesn't always support Wrap Around Mode
Product: [Applications] krita Reporter: Freya Lupen <penguinflyer2222>
Component: ToolsAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal Keywords: regression
Priority: NOR    
Version: 5.2.1   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Freya Lupen 2023-12-07 04:16:52 UTC
SUMMARY
Using the Color Sampler with 'Sample All Visible Layers',  or 'Sample Current Layer' on a File Layer, doesn't work on the 'clones' of Wrap Around Mode, which is a regression compared to 5.1.5.

The reason for this is those paint devices don't officially supportWraproundMode(), so it was probably caused when fc5c698a added that function. It seems to me that, for the purpose of color sampling, that check should be bypassed somehow.

STEPS TO REPRODUCE
Activate Wrap Around Mode, and use the Color Sampler with either:
A. 'Sample All Visible Layers'.
B. 'Sample Current Layer' on a File Layer.

OBSERVED RESULT
Picking on the wrapped copies of the image has no effect.

EXPECTED RESULT
Picking on the copies correctly picks the image's color.

SOFTWARE/OS VERSIONS
Krita 5.2.1, 5.3-prealpha git bcb23f8559.
Comment 1 Bug Janitor Service 2024-06-12 15:02:52 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/2173
Comment 2 Halla Rempt 2024-06-13 07:34:09 UTC
Git commit 841f477cd5c8dbdd70917893378061460b65a9b4 by Halla Rempt, on behalf of Freya Lupen.
Committed on 13/06/2024 at 07:33.
Pushed by rempt into branch 'master'.

Fix color sampler in wrap around mode

Some paint devices don't support painting in wrap around mode,
but they can still be sampled from, so bypass the
supportsWraproundMode check when color sampling.

M  +6    -0    libs/ui/tool/kis_tool_utils.cpp

https://invent.kde.org/graphics/krita/-/commit/841f477cd5c8dbdd70917893378061460b65a9b4
Comment 3 Halla Rempt 2024-06-13 07:34:59 UTC
Git commit 73f26f04f9892dd1ffc5b9b94e5d992d0fef4433 by Halla Rempt, on behalf of Freya Lupen.
Committed on 13/06/2024 at 07:34.
Pushed by rempt into branch 'krita/5.2'.

Fix color sampler in wrap around mode

Some paint devices don't support painting in wrap around mode,
but they can still be sampled from, so bypass the
supportsWraproundMode check when color sampling.
(cherry picked from commit 841f477cd5c8dbdd70917893378061460b65a9b4)

M  +6    -0    libs/ui/tool/kis_tool_utils.cpp

https://invent.kde.org/graphics/krita/-/commit/73f26f04f9892dd1ffc5b9b94e5d992d0fef4433