Commit 24989727 authored by Guido van Rossum's avatar Guido van Rossum

Use self.__class__ to instantiate a TreeNode item recursively, to

allow subclassing.
parent 5d2af63c
...@@ -187,7 +187,7 @@ class TreeNode: ...@@ -187,7 +187,7 @@ class TreeNode:
# _IsExpandable() was mistaken; that's allowed # _IsExpandable() was mistaken; that's allowed
return y+17 return y+17
for item in sublist: for item in sublist:
child = TreeNode(self.canvas, self, item) child = self.__class__(self.canvas, self, item)
self.children.append(child) self.children.append(child)
cx = x+20 cx = x+20
cy = y+17 cy = y+17
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment