Commit db95a53c authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[Notifications KCM] Force re-evaluation of position radio buttons

The Settings object is kind of a write-only state and doesn't signal property changes unless "live" (where it would listen to other
settings changing which we don't want inside the KCM) or only upon save().
This is arguably a questionable design decision on my side :-) but usually it's not a problem as the KCM controls will have
whatever state the user will put them in but it falls apart in case we switch to another page and back without saving.

BUG: 414098
FIXED-IN: 5.18.0

Differential Revision:
parent ae4467ef
......@@ -153,6 +153,8 @@ KCM.SimpleKCM {
Kirigami.FormData.label: i18n("Popup:")
text: i18nc("Popup position near notification plasmoid", "Show near notification icon") // "widget"
checked: kcm.settings.popupPosition === NotificationManager.Settings.CloseToWidget
// Force binding re-evaluation when user returns from position selector
+ kcm.currentIndex * 0
onClicked: kcm.settings.popupPosition = NotificationManager.Settings.CloseToWidget
enabled: root.notificationsAvailable
......@@ -164,6 +166,7 @@ KCM.SimpleKCM {
QtControls.RadioButton {
id: positionCustomPosition
checked: kcm.settings.popupPosition !== NotificationManager.Settings.CloseToWidget
+ kcm.currentIndex * 0
activeFocusOnTab: false
MouseArea {
Markdown is supported
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