Polish up context menu related code, start work on item stats

This commit is contained in:
cncfanatics
2010-10-04 13:45:30 +02:00
parent dc44598962
commit 1654843295
5 changed files with 96 additions and 55 deletions

View File

@@ -115,5 +115,12 @@ class FittingView(d.Display):
wx.CallAfter(self.spawnMenu)
def spawnMenu(self):
menu = ContextMenu.getMenu("fitting")
cFit = service.Fit.getInstance()
selection = []
sel = self.GetFirstSelected()
while sel != -1:
selection.append(self.mods[self.GetItemData(sel)])
sel = self.GetNextSelected(sel)
menu = ContextMenu.getMenu(selection, "module", "ship")
self.PopupMenu(menu)