Always show implant set menu item if you have sets, even if implant is selected

This commit is contained in:
DarkPhoenix
2019-04-18 00:44:43 +03:00
parent 614f3acc7e
commit 69f68bf4ea
21 changed files with 6 additions and 75 deletions

View File

@@ -241,13 +241,13 @@ class ImplantDisplay(d.Display):
sMkt = Market.getInstance()
sourceContext = "implantItem" if fit.implantSource == ImplantLocation.FIT else "implantItemChar"
itemContext = sMkt.getCategoryByItem(implant.item).name
menu = ContextMenu.getMenu((implant,), (sourceContext, itemContext))
fullContext = ((sourceContext, itemContext), ("implantView",))
menu = ContextMenu.getMenu((implant,), *fullContext)
elif sel == -1 and fit.implantSource == ImplantLocation.FIT:
fitID = self.mainFrame.getActiveFit()
if fitID is None:
return
context = (("implantView",),)
menu = ContextMenu.getMenu([], *context)
context = ("implantView",)
menu = ContextMenu.getMenu([], context)
if menu is not None:
self.PopupMenu(menu)