Bug 485739

Summary: Sample Screen Color continuously picks color if the Hotkey has been pressed twice.
Product: [Applications] krita Reporter: zerra2345
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.2.2   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description zerra2345 2024-04-18 15:14:26 UTC
SUMMARY
https://krita-artists.org/t/sample-screen-color-tool-wont-stop-colorpicking/89431/5
Sample screen color updated color continuously if the hotkey is pressed twice.
STEPS TO REPRODUCE
1. Use a hotkey for Sample Screen Color.
2. Do not click anywhere to confirm the color update.
3. Press the hotkey again.

OBSERVED RESULT
Now color is being continuously updated even if i switch tools.

EXPECTED RESULT
Sample Screen Tool is still being selected, and as soon as a click anywhere a color gets updated and then i return to my previous used tool.

SOFTWARE/OS VERSIONS
Windows 10 Pro
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Deif Lou 2024-05-21 11:20:06 UTC
Git commit 168203c5527f06514bbbfacaf317ce10c3538039 by Deif Lou.
Committed on 21/05/2024 at 10:21.
Pushed by deiflou into branch 'master'.

Fix bug in "sample screen color" action when it was initiated multiple times without completing

M  +8    -3    libs/ui/widgets/KisScreenColorSampler.cpp
M  +1    -0    libs/ui/widgets/KisScreenColorSampler.h
M  +22   -10   plugins/extensions/samplescreencolor/KisSampleScreenColor.cpp
M  +6    -0    plugins/extensions/samplescreencolor/KisSampleScreenColor.h

https://invent.kde.org/graphics/krita/-/commit/168203c5527f06514bbbfacaf317ce10c3538039