Fix setElementValue for checkbox.

This is fixing the issue, when setElementValue is called on checkbox
element, which is already checked. Now it is possible to uncheck this
element.
pull/184/head
David Maixner 5 years ago
parent ebb95cd8e5
commit 76f3ecda98
  1. 6
      src/AutoConnectAux.cpp

@ -188,10 +188,14 @@ bool AutoConnectAux::setElementValue(const String& name, const String value) {
}
else {
if (elm->typeOf() == AC_Checkbox) {
AutoConnectCheckbox* elmCheckbox = reinterpret_cast<AutoConnectCheckbox*>(elm);
if (value == "checked") {
AutoConnectCheckbox* elmCheckbox = reinterpret_cast<AutoConnectCheckbox*>(elm);
elmCheckbox->checked = true;
}
else
{
elmCheckbox->checked = false;
}
}
else if (elm->typeOf() == AC_Radio) {
AutoConnectRadio* elmRadio = reinterpret_cast<AutoConnectRadio*>(elm);

Loading…
Cancel
Save