Bug 432666

Summary: Can't delete any canvas input shortcuts of a lone action
Product: [Applications] krita Reporter: tomtomtomreportingin
Component: Shortcuts and Canvas Input SettingsAssignee: tomtomtomreportingin
Status: RESOLVED FIXED    
Severity: minor CC: ghevan
Priority: NOR    
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description tomtomtomreportingin 2021-02-08 21:31:58 UTC
SUMMARY
It is observable in both 4.4.2 and git master that attempting to delete any canvas input shortcut of a lone action throws a popup without any deletion occuring. Can be worked around by unsetting the shortcut instead of deleting it.

STEPS TO REPRODUCE
1. Settings -> Configure Krita -> Canvas Input Settings
2. For example, select Zoom Canvas
3. Create a shortcut for a Fit to Height action
4. Attempt to delete it

OBSERVED RESULT
A popup shows with "Deleting last shortcut for this action! It is not allowed to erase some default shortcuts. Modify it instead." without any actual deletion occuring.

EXPECTED RESULT
The shortcut should be deleted.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian sid
(available in About System)
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.12.9 (Appimage)
Comment 1 vanyossi 2021-02-09 01:38:40 UTC
afair this was intended as some canvas input shortcuts are important for krita usage and users might delete them accidentally. The idea to my understanding is tha they need to set an alternate shortcut before removing the default one.
Comment 2 tomtomtomreportingin 2021-02-10 10:37:59 UTC
The problem is that this issue affects even custom shortcuts that the user themselves create.

Regardless, this has already been fixed by Dmitry as part of my tool invocations merge request at https://invent.kde.org/graphics/krita/-/merge_requests/693 , but I just need to figure out what's causing this crash...