Bug 347541

Summary: Right-clicking on a layer's "toggle visibility" icon toggles visibility and shows context menu at the same time
Product: [Applications] krita Reporter: Victor Wåhlström <victor.wahlstrom>
Component: UsabilityAssignee: Victor Wåhlström <victor.wahlstrom>
Status: RESOLVED FIXED    
Severity: minor CC: halla
Priority: NOR    
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Fix conflict with context menu event

Description Victor Wåhlström 2015-05-11 05:01:04 UTC
This applies to all icons in a layer.

Expected behaviour: Either show context menu or trigger the toggle button, not both.

Reproducible: Always

Steps to Reproduce:
1. Right-click on one of the layer icons; visibility, locked, alpha locked, inherit alpha

Actual Results:  
Flag is toggled and context menu triggered

Expected Results:  
Either flag should be toggled or context menu shown. Not both.
Comment 1 Halla Rempt 2015-05-11 07:10:23 UTC
Hi Victor,

Thanks for your report. You're right, I can confirm the issue.
Comment 2 Victor Wåhlström 2015-05-11 12:08:50 UTC
I'd like to take a stab at fixing this. How do I assign the bug to myself?
Comment 3 Halla Rempt 2015-05-11 12:12:34 UTC
You need powers for that, but I've just given them to you :-) If you refresh, you should have "take" option next to "Assigned to".
Comment 4 Victor Wåhlström 2015-05-13 01:40:03 UTC
Created attachment 92573 [details]
Fix conflict with context menu event

Note: This fix assumes that context menu events are triggered via right mouse button. This is in theory OS specific, but it looks like other code is already making this assumption.
Comment 5 Victor Wåhlström 2015-05-13 03:35:57 UTC
Posted the patch to reviewboard as well ( https://git.reviewboard.kde.org/r/123764/ )
Comment 6 Halla Rempt 2015-05-15 14:23:50 UTC
Git commit 83b26e566982064d1e3f1c6ed708a78a25c06acc by Boudewijn Rempt.
Committed on 15/05/2015 at 14:23.
Pushed by rempt into branch 'calligra/2.9'.

REVIEW:123764
Patch by Victor Wåhlström. Thanks!
CCMAIL:kdebugs@draconic-illusion.com

M  +5    -0    krita/ui/KisDocumentSectionDelegate.cpp

http://commits.kde.org/calligra/83b26e566982064d1e3f1c6ed708a78a25c06acc