Bug 457187

Summary: git toolview: double clicking to stage/unstage causes wrong context-menu
Product: [Applications] kate Reporter: Eric Armbruster <eric1>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: christoph, waqar.17a
Priority: NOR    
Version First Reported In: Git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: stage hunk/lines

Description Eric Armbruster 2022-07-27 07:24:48 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Make some code changes in a git repo.
2. Open the git toolview and double-click a file to stage it

OBSERVED RESULT
The context menu in the diff file offers Stage Line/Hunk action.

Behaviour is correct when using the Stage action from the context menu.

EXPECTED RESULT
The context menu in the diff file should offer Unstage Line/Hunk actions

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

ADDITIONAL INFORMATION
Comment 1 Waqar Ahmed 2022-08-25 19:45:59 UTC
Hmm, cannot reproduce on a quick try.
Comment 2 Eric Armbruster 2022-08-26 09:41:15 UTC
Created attachment 151610 [details]
stage hunk/lines

Here is a video showing the bug.
Comment 3 Waqar Ahmed 2022-08-26 10:02:22 UTC
I see. This is the problem when you have actions assigned to both single and double click :/

Probably best to make single click do nothing at all by default.

Otherwise it's hard to fix this I think.
Comment 4 Waqar Ahmed 2022-08-26 10:05:38 UTC
Git commit af837868640c616e16b81ed64cec3caa2628ca37 by Waqar Ahmed.
Committed on 26/08/2022 at 10:05.
Pushed by waqar into branch 'master'.

Git: Make single click do nothing by default

M  +1    -1    addons/project/kateprojectplugin.cpp

https://invent.kde.org/utilities/kate/commit/af837868640c616e16b81ed64cec3caa2628ca37
Comment 5 Christoph Cullmann 2022-08-27 15:49:15 UTC
Would be ok with this workaround.