Bug 337368 - Changing a toolbar icon resets the corresponding customized shortcut.
Summary: Changing a toolbar icon resets the corresponding customized shortcut.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Usability (show other bugs)
Version: 2.9 Beta
Platform: Ubuntu Linux
: NOR minor
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-11 13:36 UTC by Tyson Tan
Modified: 2015-01-03 16:05 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tyson Tan 2014-07-11 13:36:45 UTC
Krita resets a customized shortcut setting, if the same function is added to the toolbar and gets changed later.

Reproducible: Always

Steps to Reproduce:
1. Set a customized shortcut, say, assign "N" to Ruler assistant editor tool;
2. Add Ruler assistant editor tool to a toolbar;
3. The shortcut is still working;
4. Make some change to the newly added Ruler assitant editor tool icon, say, give it an icon, apply;
5. The shortcut for Ruler assistant editor tool is now reset (to none)
Actual Results:  
Krita resets a customized shortcut setting, if the same function is added to the toolbar and gets changed later.

Expected Results:  
Changing the settings for toolbar icons does not reset corresponding customized shortcut.

The workaround is to finish toolbar customization before you make any change to shortcuts. However, to those who doesn't know what causes the resetting, this is a very frustrating little bug indeed.
Comment 1 Halla Rempt 2014-07-15 14:22:41 UTC
Yes. We'll fix this in time for 2.9, when we are redoing the shortcut system anyway.
Comment 2 Halla Rempt 2015-01-03 13:57:27 UTC
Git commit c02946c86c44a86a912b5c2100db8eaec5d92209 by Boudewijn Rempt.
Committed on 03/01/2015 at 11:06.
Pushed by rempt into branch 'calligra/2.9'.

Create a master action collection for the shortcut editor

This is still a half-way solution, ideally we'd just create actions from
the .action file and fetch those actions in the code where we need an
action, so there's still duplication. If we make the master action
collection the source for new actions, we will also have to make the
krita.action file translatable.

If you create an action which should have an editable shortcut, you need
to add that to a .action file. Make sure that all the text is exactly the
same, so it gets translated in the shortcut dialog.

On closing the shortcut dialog, changed shortcuts are saved. All
mainwindows's actioncollection will re-read the configuration so they
are synchronized. There's no local krita.rc file anymore, so the windows
won't be able to save the shortcuts to the local krita.rc, all shorcuts
are saved in the kritarc config file.
Related: bug 313218, bug 342270, bug 342184

A  +336  -0    krita/krita.actions
M  +1    -14   krita/ui/KisMainWindow.cpp
M  +92   -3    krita/ui/KisPart.cpp
M  +19   -0    krita/ui/KisPart.h
M  +0    -23   krita/ui/KisView.cpp
M  +0    -22   krita/ui/KisViewManager.cpp

http://commits.kde.org/calligra/c02946c86c44a86a912b5c2100db8eaec5d92209
Comment 3 Tyson Tan 2015-01-03 16:05:13 UTC
Thank you for fixing this problem, Boud! It's also nice to know you are paving the way to make Krita's shortcut sub-system more robust! :)