From 35f17402e416e55a823888478ffb86243b7b1103 Mon Sep 17 00:00:00 2001 From: that Date: Mon, 2 Nov 2015 20:15:07 +0100 Subject: gui: fix initial state of checkboxes in listbox The GUI is initialized before DataManager loads the settings file, so we need to update the checkboxes on page change too. Change-Id: If4c694872608ec4014220364bd759c1399502994 --- gui/listbox.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gui/listbox.cpp b/gui/listbox.cpp index 0a53a7c88..d2973bb6e 100644 --- a/gui/listbox.cpp +++ b/gui/listbox.cpp @@ -141,8 +141,10 @@ int GUIListBox::NotifyVarChange(const std::string& varName, const std::string& v if (isCheckList) { - if (item.variableName == varName) { - item.selected = (value != "0"); + if (item.variableName == varName || varName.empty()) { + std::string val; + DataManager::GetValue(item.variableName, val); + item.selected = (val != "0"); mUpdate = 1; } } -- cgit v1.2.3