diff --git a/gui/shipBrowser.py b/gui/shipBrowser.py index cb29e9da0..8897dbc58 100644 --- a/gui/shipBrowser.py +++ b/gui/shipBrowser.py @@ -45,7 +45,7 @@ class ShipBrowser(wx.Panel): for ID, name in sMarket.getShipRoot(): self.lpane.AddWidget(CategoryItem(self.lpane, ID, (name, 0))) - self.Layout() + self.lpane.Layout() self.Show() def stage2(self, categoryID): @@ -54,7 +54,7 @@ class ShipBrowser(wx.Panel): for ID, name, race in sMarket.getShipList(categoryID): self.lpane.AddWidget(ShipItem(self.lpane, ID, (name, 0), race)) - self.Layout() + self.lpane.Layout() self.Show() class HeaderPane (wx.Panel): @@ -101,6 +101,10 @@ class ListPane (wx.ScrolledWindow): self._wList.append(widget) self._wCount += 1 + def Layout(self): + wx.ScrolledWindow.Layout(self) + self.Refresh() + def Refresh(self): ypos = 0 cwidth, cheight = self.GetClientSize()