Skip to content
Commit 585b92af authored by Harald Sitter's avatar Harald Sitter 🐧
Browse files

unbreak help button activation by not double-resetting the view

Summary:
when sidepanel clickedSlot gets called it issues clicked() and that causes
a reset of the infocenter state (among other things disabling the help
button). previously this reset would happen all the time.
if you clicked the same kcm in the sidepanel twice the first click would
reset and then activate the help button, the second click would reset and
then not enable the help button because the kcm is already loaded (see
setKcm).

this broke in 5e27d947 which caused every
click event to get signaled twice for every single entry (thus always
resulting in a double reset) AND the commit also introduced
the reload-guard in setKcm which ultimately resulted in the entirely broken
behavior of resetting the UI twice but only loading kcm-dependent states
once

to resolve this problem the actual selected Item* is now held in the
InfoCenter and when a click is received it will only result in a UI reset
iff the clicked item isn't already the active item. the check in setKcm
is replaced by this.
additionally the sidepanel now only connects to activated() signals as
activation also includes activation-by-click rendering the second
connection a duplicate.

BUG: 392597
FIXED-IN: 5.15.2
CHANGELOG: The "Module Help" button gets enabled when help is available

Test Plan:
- select memory module (has documention)
- module help button enabled
- select about module (has no documentation)
- help disabled
- keyboard navigate to memory module
- help enabled
- click to double-activate the memory module
- help stays enabled

Reviewers: #plasma, mart

Reviewed By: #plasma, mart

Subscribers: apol, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D19187
parent 36560a5c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment