From c8ae34f226e028abadef5ebce539f29d950604ec Mon Sep 17 00:00:00 2001 From: cncfanatics Date: Thu, 19 Aug 2010 15:47:42 +0200 Subject: [PATCH] Tweak shipBrowser so raceless ships don't make it go all QQ and stuff --- gui/shipBrowser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gui/shipBrowser.py b/gui/shipBrowser.py index 46d8a1877..4d94b8454 100644 --- a/gui/shipBrowser.py +++ b/gui/shipBrowser.py @@ -21,7 +21,7 @@ class ShipBrowser(wx.Panel): self.shipView.SetImageList(self.shipImageList) self.splitter.SplitHorizontally(self.shipView, self.fitView) - self.splitter.SetMinimumPaneSize(250) + self.splitter.SetMinimumPaneSize(400) self.shipRoot = self.shipView.AddRoot("Ships") @@ -41,6 +41,7 @@ class ShipBrowser(wx.Panel): imageId = self.shipImageList.Add(bitmapLoader.getBitmap("race_%s_small" % race, "icons")) self.raceImageIds[race] = imageId + self.races.append("None") #Bind our lookup method to when the tree gets expanded self.shipView.Bind(wx.EVT_TREE_ITEM_EXPANDING, self.expandLookup) self.idRaceMap = {} @@ -77,4 +78,4 @@ class ShipView(wx.TreeCtrl): else: id1 = self.GetPyData(treeId1) id2 = self.GetPyData(treeId2) - return cmp(self.races.index(self.idRaceMap[id1]), self.races.index(self.idRaceMap[id2])) + return cmp(self.races.index(self.idRaceMap[id1] or "None"), self.races.index(self.idRaceMap[id2] or "None"))