示例#1
0
 def _openAfterImport(self, fits):
     if len(fits) > 0:
         if len(fits) == 1:
             fit = fits[0]
             wx.PostEvent(self, FitSelected(fitID=fit.ID))
             wx.PostEvent(self.shipBrowser, Stage3Selected(shipID=fit.shipID, back=True))
         else:
             wx.PostEvent(self.shipBrowser, ImportSelected(fits=fits, back=True))
示例#2
0
    def activate(self, fullContext, selection, i):
        fitID = self.mainFrame.getActiveFit()
        sFit = service.Fit.getInstance()
        stuff = sFit.getFit(fitID).ship
        groupID = stuff.item.group.ID

        self.mainFrame.notebookBrowsers.SetSelection(1)
        wx.PostEvent(self.mainFrame.shipBrowser,Stage3Selected(shipID=stuff.item.ID, back=groupID))
示例#3
0
文件: mainFrame.py 项目: potatoi/Pyfa
 def _openAfterImport(self, fits):
     if len(fits) > 0:
         if len(fits) == 1:
             fit = fits[0]
             wx.PostEvent(self, FitSelected(fitID=fit.ID))
             wx.PostEvent(self.shipBrowser,
                          Stage3Selected(shipID=fit.shipID, back=True))
         else:
             fits.sort(key=lambda _fit: (_fit.ship.item.name, _fit.name))
             results = []
             for fit in fits:
                 results.append((fit.ID, fit.name, fit.modifiedCoalesce,
                                 fit.ship.item, fit.notes))
             wx.PostEvent(self.shipBrowser,
                          ImportSelected(fits=results, back=True))