- if ( (type == "button" || !v.empty())
- && (type != "check" || (v == "true" || v == "false"))
- && (type != "spin" || (atoi(v.c_str()) >= min && atoi(v.c_str()) <= max)))
- {
- if (type != "button")
- currentValue = v;
-
- if (on_change)
- (*on_change)(*this);
- }
+ if ( (type != "button" && v.empty())
+ || (type == "check" && v != "true" && v != "false")
+ || (type == "spin" && (atoi(v.c_str()) < min || atoi(v.c_str()) > max)))
+ return;
+
+ if (type != "button")
+ currentValue = v;
+
+ if (on_change)
+ (*on_change)(*this);