Bug 425654 - Custom shortcuts denoted in toolbox tooltips aren't saved and reset back to showing defaults after restarting Krita
Summary: Custom shortcuts denoted in toolbox tooltips aren't saved and reset back to s...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Dockers (show other bugs)
Version: 4.3.0
Platform: Appimage Linux
: NOR minor
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-21 20:37 UTC by tomtomtomreportingin
Modified: 2022-05-31 09:17 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 tomtomtomreportingin 2020-08-21 20:37:19 UTC
SUMMARY
Strictly a visual issue: The shortcuts that appear next to the tool name tooltips do accommodate custom shortcuts once you first set them, but this behavior isn't saved and they go back to showing the default shortcuts after restarting Krita.

STEPS TO REPRODUCE
1. Note that the tooltip of the Gradient tool for example shows "Gradient Tool (G)"
2. Rebind Gradient tool to Shift+G
3. Note that the tooltip of the Gradient tool accommodates with "Gradient Tool (Shift+G)
4. Restart Krita

OBSERVED RESULT
The tooltip reverts back to its default "Gradient Tool (G)"

EXPECTED RESULT
Should show "Gradient Tool (Shift+G)", the accommodating behavior should save after restarting Krita

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian sid
(available in About System)
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.12.8 (Appimage)

ADDITIONAL INFORMATION
Happens in both the appimage and the Debian sid repo version.
Comment 1 Ahab Greybeard 2020-08-26 10:04:24 UTC
I can confirm this for the 4.2.0 appimage through to the Aug 25 4.4.0 alpha (git f501273 and 5.0.0 prealpha (git f2d3c13) appimages.

Also: After a restart, the SVG Text Tool icon shows a tooltip of Ctrl+T, which is not true because the default shortcut is None (and Ctrl+T is normally the default Transform tool shortcut). If you set the Text Tool shortcut to something then it shows the correct tooltip for that session and reverts to Ctrl+T after a restart while correctly responding to the new shortcut.
Comment 2 tomtomtomreportingin 2022-03-24 20:15:12 UTC
This bug has regressed into further bugginess since it's been reported: In 4.4.7 and 5, the toolbox tooltips NEVER change after configuring shortcuts. It appears that the connection from "connect(m_toolAction, SIGNAL(changed()), SLOT(setDataFromToolAction()));" in KoToolBoxButton.cpp is no longer ever triggered, perhaps due to refactors in KoToolManager_p, KoToolManager, KoToolFactoryBase, etc...
Comment 3 Lynx3d 2022-05-31 09:17:38 UTC
Git commit 08fb201ef09190cc4abc14cfe51cabc76580dbb0 by Mathias Wein.
Committed on 31/05/2022 at 08:36.
Pushed by mwein into branch 'master'.

Make Tool Box update tooltips on shortcut changes

For this to work, KoToolBoxDocker was made a KisMainWindowObserver.
And the main window has to create tool actions before passing the
view manager to the observers.

This allows the docker to fetch the actual QAction objects responding
to the shortcuts, and synchronize with their tooltip.

Maybe KoToolBox should now just use KisHighlightedToolButton instead of
yet another custom button class.
Related: bug 432070

M  +5    -5    libs/ui/KisMainWindow.cpp
M  +17   -0    libs/ui/toolbox/KoToolBox.cpp
M  +30   -12   libs/ui/toolbox/KoToolBoxButton.cpp
M  +4    -1    libs/ui/toolbox/KoToolBoxButton_p.h
M  +5    -0    libs/ui/toolbox/KoToolBoxDocker.cpp
M  +4    -2    libs/ui/toolbox/KoToolBoxDocker_p.h
M  +2    -0    libs/ui/toolbox/KoToolBox_p.h

https://invent.kde.org/graphics/krita/commit/08fb201ef09190cc4abc14cfe51cabc76580dbb0