From 83045375ec2bd0fd01f6bb71dfca380baa754fc7 Mon Sep 17 00:00:00 2001 From: Pavel Mars Date: Tue, 9 Apr 2019 08:16:00 -0600 Subject: [PATCH] Show accurate checked state for system monitor configuration pages Summary: Fixed general settings of the widgets "Memory Status", "Hard Disk Space Usage", "Network Monitor", "Hard Disk Monitor". - correctly set checked/unchecked state on load. Reviewers: jriddell, #plasma, ngraham, broulik, davidedmundson Reviewed By: #plasma, ngraham, davidedmundson Subscribers: broulik, davidedmundson, ngraham, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D17796 --- .../systemmonitor/common/contents/ui/ConfigGeneral.qml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/applets/systemmonitor/common/contents/ui/ConfigGeneral.qml b/applets/systemmonitor/common/contents/ui/ConfigGeneral.qml index 943768c56..6c6356da4 100644 --- a/applets/systemmonitor/common/contents/ui/ConfigGeneral.qml +++ b/applets/systemmonitor/common/contents/ui/ConfigGeneral.qml @@ -31,7 +31,8 @@ Item { implicitHeight: mainColumn.implicitHeight property var cfg_sources: [] - onCfg_sourcesChanged: { + + function sourcesChanged() { if (! cfg_sources) { cfg_sources = [] } if (cfg_sources.length == 0) { for (var i in mainColumn.children) { @@ -49,6 +50,11 @@ Item { } } } + + onCfg_sourcesChanged: { + sourcesChanged(); + } + property int cfg_updateInterval signal sourceAdded(string source) @@ -94,6 +100,7 @@ Item { var source = smSource.sources[i]; iconsPage.sourceAdded(source); } + sourcesChanged(); } ListModel {