- params.setAttribute("type", "constant");
- params.setAttribute("factor", "100");
+ if (params.attribute("min") == "0" && params.attribute("max") == "1")
+ params.setAttribute("type", "bool");
+ else {
+ params.setAttribute("type", "constant");
+ params.setAttribute("factor", "100");
+ }