Implement open fit context item for projected fits
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
__all__ = ["moduleAmmoPicker", "itemStats", "damagePattern", "marketJump", "droneSplit", "itemRemove",
|
||||
__all__ = ["openFit", "moduleAmmoPicker", "itemStats", "damagePattern", "marketJump", "droneSplit", "itemRemove",
|
||||
"droneRemoveStack", "ammoPattern", "project", "factorReload", "whProjector", "cargo", "shipJump",
|
||||
"targetResists"]
|
||||
|
||||
20
gui/builtinContextMenus/openFit.py
Normal file
20
gui/builtinContextMenus/openFit.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from gui.contextMenu import ContextMenu
|
||||
import gui.mainFrame
|
||||
import wx
|
||||
from gui.shipBrowser import FitSelected
|
||||
|
||||
class OpenFit(ContextMenu):
|
||||
def __init__(self):
|
||||
self.mainFrame = gui.mainFrame.MainFrame.getInstance()
|
||||
|
||||
def display(self, srcContext, selection):
|
||||
return "projectedFit" in srcContext
|
||||
|
||||
def getText(self, itmContext, selection):
|
||||
return "Open Fit in New Tab"
|
||||
|
||||
def activate(self, fullContext, selection, i):
|
||||
fit = selection[0]
|
||||
wx.PostEvent(self.mainFrame, FitSelected(fitID=fit.ID, startup=2))
|
||||
|
||||
OpenFit.register()
|
||||
Reference in New Issue
Block a user