def activate(self, fullContext, selection, i): fitID = self.mainFrame.getActiveFit() sFit = 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))
def _openAfterImport(self, fits): if len(fits) > 0: if len(fits) == 1: fit = fits[0] wx.PostEvent(self, FitSelected(fitID=fit.ID, from_import=True)) 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))
def activate(self, callingWindow, fullContext, i): fitID = self.mainFrame.getActiveFit() ship = Fit.getInstance().getFit(fitID).ship self.mainFrame.notebookBrowsers.SetSelection(1) wx.PostEvent(self.mainFrame.shipBrowser, Stage3Selected(shipID=ship.item.ID, back=True))