beremiz

Parents 775b48a2be3b
Children 30e72bc7d21b
Fixed bug when adding standard function like ADD, SUB, MUL,... that are overloaded. Block type was not selected and shown when opening FBDBlockDialog to edit it.
--- a/PLCControler.py Wed Jun 05 23:09:52 2013 +0200
+++ b/PLCControler.py Wed Jun 05 23:13:33 2013 +0200
@@ -1577,7 +1577,7 @@
result_blocktype["inputs"] = [(i[0], "ANY", i[2]) for i in result_blocktype["inputs"]]
result_blocktype["outputs"] = [(o[0], "ANY", o[2]) for o in result_blocktype["outputs"]]
return result_blocktype
- result_blocktype = blocktype
+ result_blocktype = blocktype.copy()
if result_blocktype is not None:
return result_blocktype
project = self.GetProject(debug)
--- a/controls/LibraryPanel.py Wed Jun 05 23:09:52 2013 +0200
+++ b/controls/LibraryPanel.py Wed Jun 05 23:13:33 2013 +0200
@@ -185,10 +185,7 @@
if pydata is not None and self.Tree.GetItemText(root) == name and same_inputs:
return root
else:
- if wx.VERSION < (2, 6, 0):
- item, root_cookie = self.Tree.GetFirstChild(root, 0)
- else:
- item, root_cookie = self.Tree.GetFirstChild(root)
+ item, root_cookie = self.Tree.GetFirstChild(root)
while item.IsOk():
result = self.FindTreeItem(item, name, inputs)
if result: