plasma: update the key sequence widget when the applet global shortcut changes

for the case when it is stolen

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-04-27 04:18:19 +03:00
parent a2f589fc43
commit 98f6b2b434

View file

@ -1439,6 +1439,13 @@ void AppletPrivate::globalShortcutChanged()
return;
}
if (shortcutEditor) {
// update the key sequence widget, the key sequence changes when it is stolen too
shortcutEditor.data()->blockSignals(true);
shortcutEditor.data()->setKeySequence(activationAction->globalShortcut());
shortcutEditor.data()->blockSignals(false);
}
KConfigGroup shortcutConfig(mainConfigGroup(), "Shortcuts");
shortcutConfig.writeEntry("global", activationAction->globalShortcut().toString());
scheduleModificationNotification();