Skip to content

Commit

Permalink
wxGUI/treemodel: revert weakref as it doesn't work with deepcopy (#782)
Browse files Browse the repository at this point in the history
Fixes #781. Reverted #775, more work to enable deepcopy needed.
  • Loading branch information
petrasovaa committed Jul 13, 2020
1 parent 423ccab commit c3a3f57
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gui/wxpython/core/treemodel.py
Expand Up @@ -80,7 +80,9 @@ def AppendNode(self, parent, label, data=None):
# useful for debugging deleting nodes
# weakref.finalize(node, print, "Deleted node {}".format(label))
parent.children.append(node)
node.parent = weakref.proxy(parent)
# weakref doesn't work out of the box when deepcopying this class
# node.parent = weakref.proxy(parent)
node.parent = parent
return node

def SearchNodes(self, parent=None, **kwargs):
Expand Down

0 comments on commit c3a3f57

Please sign in to comment.