Fixed a graphic bug when adding a fleet item that is beyond visible area (and have the vertical scrollbar shown) doesnt properly resize(refresh all fleet items to take in account the scrollbar, also scroll the container to the added fleet item

This commit is contained in:
HomeWorld
2010-11-25 17:02:55 +02:00
parent bb827fdb54
commit 7682c46a62

View File

@@ -92,7 +92,9 @@ class FleetBrowser(wx.Panel):
def AddItem (self, ID, name, count):
self.fleetItemContainer.AddWidget(FleetItem(self, ID, name, count))
self.fleetItemContainer.RefreshList()
widget = self.fleetItemContainer.GetWidgetByFleetID(ID)
self.fleetItemContainer.RefreshList(True)
self.fleetItemContainer.ScrollChildIntoView(widget)
def PopulateFleetList(self):
self.Freeze()