properly delete children of canvas with the new class name scheme

This commit is contained in:
Joe Shochet 2007-08-26 08:54:20 +00:00
parent 6e5a6da175
commit 49140d12ca
1 changed files with 7 additions and 1 deletions

View File

@ -92,7 +92,13 @@ class DirectScrolledFrame(DirectFrame):
# Destroy children of the canvas
for child in self.canvas.getChildrenAsList():
childGui = self.guiDict.get(child.getName())
if childGui: childGui.destroy()
if childGui:
childGui.destroy()
else:
parts = child.getName().split('-')
simpleChildGui = self.guiDict.get(parts[-1])
if simpleChildGui:
simpleChildGui.destroy()
self.verticalScroll.destroy()
self.horizontalScroll.destroy()
del self.verticalScroll