https://bugs.kde.org/show_bug.cgi?id=362134

Stefano Bonicatti <smj...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smj...@gmail.com

--- Comment #2 from Stefano Bonicatti <smj...@gmail.com> ---
So i'm trying to fix this since yesterday, but all i can see is a mess with the
action and shortcut dealing.
We have a lot of duplicate code that does duplicate stuff and gets called
multiple time to do (apparently the same?) thing.
Namely KActionCollection writes the shortcut settings in kritashortcutsrc
through writeSettings function when they are changed, though there it loops
through the actions and it write both shortcuts (primary and alternate), with a
format that is "actionName=primary; alternate".
When Krita loads, readSettings gets called which internally calls
loadCustomShortcuts of our KisActionRegistry class and here a first bell rang:
we do have a writeCustomShortcuts function in KisActionRegistry but it's not
used, moreover it writes the shortcut with a different format, namely only the
custom shortcut is written.
But then again even more confusion is added looking at ActionInfoItem, the
struct used in writeCustomShortcuts and loadCustomShortcuts.
Is defaultShortcut meant to be the primary shortcut or the actual
defaultShortcut that is shown as a "default" option in the shortcut editor?
And if the latter, since we only have one customShortcut key sequence, how can
that deal with having a possible primary and alternate shortcut?
And in the end, looking at KisShortcutsDialog_p.cpp, primarySequence and
alternateSequence functions we see what the dialog (and probably the rest of
the system) expexts, an action with TWO key sequences, but when we load the
configs from our kritashortcutsrc we only load one, with the string "primary;
alternate".

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to