diff -r 4e3f5b320bc3 -r 3f06a178b960 PLCControler.py --- a/PLCControler.py Thu Sep 20 17:38:27 2007 +0200 +++ b/PLCControler.py Tue Oct 02 18:00:13 2007 +0200 @@ -1455,7 +1455,7 @@ for var in varlist.getVariable(): if var.getName() == varname: return var.getType().getValue() - return "" + return None def SetConnectionWires(self, connection, connector): wires = connector.GetWires() @@ -1975,14 +1975,12 @@ instance = element.getInstance(id) if isinstance(instance, plcopen.block): blocktype = instance.getTypeName() - blocktype_infos = GetBlockType(blocktype) - if blocktype_infos["type"] != "function": - if self.CurrentElementEditing != None: - name = self.ElementsOpened[self.CurrentElementEditing] - words = name.split("::") - if words[0] in ["P","T","A"]: - pou = self.Project.getPou(words[1]) - pou.removePouVar(blocktype, instance.getInstanceName()) + if self.CurrentElementEditing != None: + name = self.ElementsOpened[self.CurrentElementEditing] + words = name.split("::") + if words[0] in ["P","T","A"]: + pou = self.Project.getPou(words[1]) + pou.removePouVar(blocktype, instance.getInstanceName()) element.removeInstance(id) self.RefreshPouUsingTree()