# HG changeset patch # User Laurent Bessard # Date 1370466813 -7200 # Node ID d51cea72baa7174a1e3d6a44632c80d5e8a5dd26 # Parent 775b48a2be3b0338f4bc9f694d68aa42bd44a691 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. diff -r 775b48a2be3b -r d51cea72baa7 PLCControler.py --- 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) diff -r 775b48a2be3b -r d51cea72baa7 controls/LibraryPanel.py --- 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: