diff --git a/gui/checkbox.cpp b/gui/checkbox.cpp index 025a803a..ad16f24c 100755 --- a/gui/checkbox.cpp +++ b/gui/checkbox.cpp @@ -78,8 +78,13 @@ GUICheckbox::GUICheckbox(xml_node<>* node) if (attr) mVarName = attr->value(); attr = child->first_attribute("default"); - if (attr) + if (attr) { DataManager::SetValue(mVarName, attr->value()); + } else { + int val; + if (DataManager::GetValue(mVarName, val) != 0) + DataManager::SetValue(mVarName, 0); // Prevents check boxes from having to be tapped twice the first time + } } mCheckW = mCheckH = 0;