Skip to content

Fix keyboard shortcuts reset after first use (in most cases)

Several users noticed that Toggle Change Colors forgets its keyboard shortcut after the first use. This happened because these action write to Okular::Settings, so configChanged() is emitted. Part has connected KXMLGUIFactory::refreshActionProperties() to configChanged(), so shortcuts are reset when using them.

This makes DrawingToolActions listen to a more specific config notify signal, so this bug is triggered much less often (only when closing the configuration dialog).

Additionally, this makes DrawingToolActions use un/plugActionList() instead of refreshActionProperties(), which should be enough to be prepared for a fix in KXMLGUI.

Additionally, DrawingToolActions now listens to the configuration itself, not through Part; which is slightly less complicated IMHO.

Additionally, this includes the KXMLGUI workaround from !290 (closed).

Closes these bugs, a new bug report shall be opened to describe the new conditions to trigger this bug:

BUGS: 384700, 411492

Edited by David Hurka

Merge request reports