Adding '0' and '1' as possible value to force boolean variables
authorlaurent
Thu, 21 Apr 2011 15:15:57 +0200
changeset 536 288324dddfb8
parent 535 08f32198e932
child 537 a31bf722aa82
Adding '0' and '1' as possible value to force boolean variables
dialogs/ForceVariableDialog.py
--- a/dialogs/ForceVariableDialog.py	Thu Apr 21 11:06:17 2011 +0200
+++ b/dialogs/ForceVariableDialog.py	Thu Apr 21 15:15:57 2011 +0200
@@ -119,7 +119,7 @@
     else:
         return None
 
-GetTypeValue = {"BOOL": lambda x: {"TRUE": True, "FALSE": False}.get(x.upper(), None),
+GetTypeValue = {"BOOL": lambda x: {"TRUE": True, "FALSE": False, "0": False, "1": True}.get(x.upper(), None),
                 "SINT": getinteger,
                 "INT": getinteger,
                 "DINT": getinteger,