Bug 394396 - Color selector tool changes to the random colors.
Summary: Color selector tool changes to the random colors.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Color Selectors (show other bugs)
Version: 4.0.3
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Emmet O'Neill
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-18 03:27 UTC by Trinity Taulbee
Modified: 2018-05-23 10:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Trinity Taulbee 2018-05-18 03:27:30 UTC
Every time I use the color selector tool to get a color off the canvas and use it it doesn't use the right color or just goes to black or white. This is a big issue as well as it soon crashes the whole program making it frustrating to deal with constantly.
Comment 1 Emmet O'Neill 2018-05-18 03:58:41 UTC
Thanks for reporting this issue, Trinity. Really sorry for the frustration!

I've been able to reproduce the color selecting problem that you're describing, and it only seems to happen when I really quickly double-click while picking colors. If I single-click it works fine. I know that doesn't solve your issue, but it might be a way to work around it for now while we research the problem.

However, I have not been able to reproduce any crash related to the color picker so far. I'll keep testing for that.
Comment 2 Emmet O'Neill 2018-05-18 04:42:24 UTC
Hi again. I just wanted to add that this bug seems to be limited to the double-clicking while using the Ctrl-Picker (the one that you can access from other tools by pressing the Ctrl key). So another potential work-around is to use the dedicated color selector tool (hotkey: P) for now.
Comment 3 Dmitry Kazakov 2018-05-18 19:25:49 UTC
Git commit 1d8c0c10ca99b086b77b0365a471cafa391b0687 by Dmitry Kazakov, on behalf of Emmet O'Neill.
Committed on 18/05/2018 at 19:24.
Pushed by dkazakov into branch 'master'.

Bug fix: Ctrl-activated color picker no longer glitches out when double clicking with a mouse.

Summary:
Currently a glitch exists where double clicking with a mouse while using the ctrl key-activated color picker causes the `KisAbstractInputAction::eventPos` and ``KisAbstractInputAction::eventPosF` functions to return an incorrect value, which then causes the ctrl-picker to return an undefined and unwanted color (usually black or white).

This patch fixes this bug by simply adding the `QEvent::MouseButtonDblClick` case to both switch statements, returning the correct position info for the abstract input events.

I believe this should close https://bugs.kde.org/show_bug.cgi?id=394396 . Although the user reported a crash associated with this bug, I was unable to reproduce any.

I also threw in some tiny formatting/style changes while I was in those files.

Test Plan:
Using a mouse, select the Brush Tool, hold the Ctrl Key to pop up a color picker, and double click.

Without this patch applied the picked color will often incorrectly be pure black or pure white, which seems to change depending on the zoom level.

After this patch, double clicking should not create any unwanted or unpredictable behavior from the ctrl-picker.
Reviewers: #krita, rempt, dkazakov
Reviewed By: #krita, dkazakov
Subscribers: #krita
Tags: #krita
Differential Revision: https://phabricator.kde.org/D12953

M  +10   -10   libs/ui/input/kis_abstract_input_action.cpp
M  +0    -1    libs/ui/input/kis_alternate_invocation_action.cpp

https://commits.kde.org/krita/1d8c0c10ca99b086b77b0365a471cafa391b0687
Comment 4 Halla Rempt 2018-05-23 10:16:58 UTC
Git commit 584c0eca35c13121bc5ea712bfc09297d13cbecb by Boudewijn Rempt, on behalf of Emmet O'Neill.
Committed on 23/05/2018 at 09:32.
Pushed by rempt into branch 'krita/4.0'.

Bug fix: Ctrl-activated color picker no longer glitches out when double clicking with a mouse.

Summary:
Currently a glitch exists where double clicking with a mouse while using the ctrl key-activated color picker causes the `KisAbstractInputAction::eventPos` and ``KisAbstractInputAction::eventPosF` functions to return an incorrect value, which then causes the ctrl-picker to return an undefined and unwanted color (usually black or white).

This patch fixes this bug by simply adding the `QEvent::MouseButtonDblClick` case to both switch statements, returning the correct position info for the abstract input events.

I believe this should close https://bugs.kde.org/show_bug.cgi?id=394396 . Although the user reported a crash associated with this bug, I was unable to reproduce any.

I also threw in some tiny formatting/style changes while I was in those files.

Test Plan:
Using a mouse, select the Brush Tool, hold the Ctrl Key to pop up a color picker, and double click.

Without this patch applied the picked color will often incorrectly be pure black or pure white, which seems to change depending on the zoom level.

After this patch, double clicking should not create any unwanted or unpredictable behavior from the ctrl-picker.
Reviewers: #krita, rempt, dkazakov
Reviewed By: #krita, dkazakov
Subscribers: #krita
Tags: #krita
Differential Revision: https://phabricator.kde.org/D12953

(cherry picked from commit 1d8c0c10ca99b086b77b0365a471cafa391b0687)

M  +10   -10   libs/ui/input/kis_abstract_input_action.cpp
M  +0    -1    libs/ui/input/kis_alternate_invocation_action.cpp

https://commits.kde.org/krita/584c0eca35c13121bc5ea712bfc09297d13cbecb