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
diff --git a/gui/listbox.cpp b/gui/listbox.cpp
index 0a53a7c..d2973bb 100644
--- a/gui/listbox.cpp
+++ b/gui/listbox.cpp
@@ -141,8 +141,10 @@
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;
}
}