Fix IndexError when selecting module index that doesn't exist. Also, tweaked setting the selItem variable.

This commit is contained in:
blitzmann
2015-07-04 01:27:57 -04:00
parent bfdc2161e0
commit 1326e21f6b

View File

@@ -505,12 +505,9 @@ class MainFrame(wx.Frame):
self.additionsPane.notebook.SetSelection(selTab)
def ItemSelect(self, event):
selItem = None
for i in range(0, 9):
if event.GetId() == self.itemSelect[i]:
selItem = i;
if selItem is not None:
selItem = self.itemSelect.index(event.GetId())
if selItem < len(self.marketBrowser.itemView.active):
wx.PostEvent(self, ItemSelected(itemID=self.marketBrowser.itemView.active[selItem].ID))
def CTabNext(self, event):