Bug 392815 - Layer's color label changes unexpectedly when holding right-click in Layers docker's right-click menu
Summary: Layer's color label changes unexpectedly when holding right-click in Layers d...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Dockers (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
: 376552 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-04-06 18:49 UTC by Tyson Tan
Modified: 2019-05-03 09:37 UTC (History)
4 users (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 Tyson Tan 2018-04-06 18:49:55 UTC
krita-4.1.0-pre-alpha-36d2430-x86_64.appimage

When right-click is being HOLD to call Layers docker's right-click menu, it automatically assign the layer with a color label the mouse is hovered on.

How to reproduce:
1) Create a new document.
2) Layers docker, mouse over Layer 2.
3) HOLD right-click to call out the menu, do not release the switch yet.
4) Move cursor over any of the color label blocks.
5A) Wait for a second while paying attention to Layers docker, then move away the cursor and release the switch. 
5B) Or, After moving cursor over a color label, continue to move the cursor onto any other command, like Merge with Layer below, and release the right-click switch.
6) The color label of Layer 2 is now changed to the color of what the cursor just hovered.

This bug affects mostly graphics tablet users. This is because side-switches on a stylus can't do "click-and-release" reliably. We often resort to holding the side-switch down for right clicks.

And since the color label blocks are being placed so high up in the right-click menu, the cursor is almost guaranteed to move over one of them before reaching the items below. 

I often see my layers get their color labels changed unexpectedly when I merge a layer using the Layers docker's right-click menu and then immediately Undoing it (otherwise the merge will not keep the upper layer's color label).

I think this bug shares its root with:
https://bugs.kde.org/show_bug.cgi?id=378484
https://bugs.kde.org/show_bug.cgi?id=389560
Comment 1 Antti Savolainen 2018-04-09 05:23:47 UTC
Can confirm https://webmshare.com/3XNY3
Comment 2 Dmitry Kazakov 2018-04-18 11:18:57 UTC
Git commit 25d65a4856df6337b30b0d77bc4a4b9f32efe228 by Dmitry Kazakov.
Committed on 18/04/2018 at 11:18.
Pushed by dkazakov into branch 'master'.

Don't let color label widget to mess up labels when right button is pressed

M  +2    -2    libs/ui/widgets/kis_color_label_selector_widget.cpp

https://commits.kde.org/krita/25d65a4856df6337b30b0d77bc4a4b9f32efe228
Comment 3 Tyson Tan 2018-04-18 11:22:16 UTC
Thank you Dmitry! :D
Comment 4 Halla Rempt 2018-05-02 12:00:06 UTC
Git commit d1b5ba69b21282b7e7ab8063f98d4dc1b7df28f7 by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 02/05/2018 at 11:54.
Pushed by rempt into branch 'krita/4.0'.

Don't let color label widget to mess up labels when right button is pressed
(cherry picked from commit 813b2c19ec855066222bebad623e048baaa1cdf7)

M  +2    -2    libs/ui/widgets/kis_color_label_selector_widget.cpp

https://commits.kde.org/krita/d1b5ba69b21282b7e7ab8063f98d4dc1b7df28f7
Comment 5 Halla Rempt 2019-05-03 09:35:04 UTC
*** Bug 376552 has been marked as a duplicate of this bug. ***
Comment 6 Halla Rempt 2019-05-03 09:36:31 UTC
This still doesn't work in a comfortable way. I think that we should disable selecting a color at all on mousemove, and only select a color on explicit click.
Comment 7 Halla Rempt 2019-05-03 09:37:55 UTC
Git commit 7d11dcf91309a386d942b56fc8aac4fd0f2fa9ee by Boudewijn Rempt.
Committed on 03/05/2019 at 09:37.
Pushed by rempt into branch 'master'.

Don't select a layer color by moving the mouse over the widget

M  +0    -5    libs/ui/widgets/kis_color_label_selector_widget.cpp

https://invent.kde.org/kde/krita/commit/7d11dcf91309a386d942b56fc8aac4fd0f2fa9ee