From f4980016e78633034c7041603ee921da3a9e90bf Mon Sep 17 00:00:00 2001 From: cncfanatics Date: Mon, 25 Oct 2010 16:22:22 +0200 Subject: [PATCH] Minor fixups --- gui/shipBrowser.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gui/shipBrowser.py b/gui/shipBrowser.py index 2e0e0500c..e8a98faf2 100644 --- a/gui/shipBrowser.py +++ b/gui/shipBrowser.py @@ -120,12 +120,16 @@ class ListPane (wx.ScrolledWindow): self._wList[i].Refresh() self.SetVirtualSize((1, ypos)) + def RemoveChild(self, child): + wx.Panel.RemoveChild(self, child) + child.Hide() + child.Destroy() + self._wCount -= 1 + def RemoveAllChildren(self): for widget in self._wList: self.RemoveChild(widget) - widget.Hide() - widget.Close() - self._wCount = 0 + self._wList = [] class CategoryItem(wx.Window):