beremiz

Parents b24c11c93766
Children afc4963d8f0c
Fixed bug on variables with empty name in VariablePanel can't be edited
--- a/plcopen/plcopen.py Sun Mar 17 19:03:25 2013 +0100
+++ b/plcopen/plcopen.py Wed Mar 20 23:47:07 2013 +0100
@@ -1383,7 +1383,7 @@
setattr(cls, "removepouVar", removepouVar)
def hasblock(self, name):
- if self.getbodyType() in ["FBD", "LD", "SFC"]:
+ if name != "" and self.getbodyType() in ["FBD", "LD", "SFC"]:
for instance in self.getinstances():
if isinstance(instance, PLCOpenClasses["fbdObjects_block"]) and instance.getinstanceName() == name:
return True