Destroy the tree when closing.

This commit is contained in:
Guido van Rossum 1999-06-25 17:08:19 +00:00
parent 30455f3050
commit 5af0df528d
1 changed files with 2 additions and 1 deletions

View File

@ -36,6 +36,7 @@ class ClassBrowser:
def close(self, event=None): def close(self, event=None):
self.top.destroy() self.top.destroy()
self.node.destroy()
def init(self, flist): def init(self, flist):
self.flist = flist self.flist = flist
@ -51,7 +52,7 @@ class ClassBrowser:
sc = ScrolledCanvas(top, bg="white", highlightthickness=0, takefocus=1) sc = ScrolledCanvas(top, bg="white", highlightthickness=0, takefocus=1)
sc.frame.pack(expand=1, fill="both") sc.frame.pack(expand=1, fill="both")
item = self.rootnode() item = self.rootnode()
node = TreeNode(sc.canvas, None, item) self.node = node = TreeNode(sc.canvas, None, item)
node.update() node.update()
node.expand() node.expand()