Files
pyfa/gui/builtinContextMenus/openFit.py
a-tal d3b6bc1c93 so many pep8 fixes
(cherry picked from commit bee125d)
2016-12-13 20:16:44 -08:00

22 lines
577 B
Python

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 srcContext == "projectedFit"
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()