MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / _openAfterImport

Method _openAfterImport

gui/mainFrame.py:944–963  ·  view source on GitHub ↗
(self, fits)

Source from the content-addressed store, hash-verified

942 progress.callback(*progress.cbArgs)
943
944 def _openAfterImport(self, fits):
945 if len(fits) > 0:
946 if len(fits) == 1:
947 fit = fits[0]
948 wx.PostEvent(self, FitSelected(fitID=fit.ID, from_import=True))
949 wx.PostEvent(self.shipBrowser, Stage3Selected(shipID=fit.shipID, back=True))
950 else:
951 fits.sort(key=lambda _fit: (_fit.ship.item.name, _fit.name))
952 # Show 100 fits max
953 fits = fits[:100]
954 results = []
955 for fit in fits:
956 results.append((
957 fit.ID,
958 fit.name,
959 fit.modifiedCoalesce,
960 fit.ship.item,
961 fit.notes
962 ))
963 wx.PostEvent(self.shipBrowser, ImportSelected(fits=results, back=True))
964
965 def importCharacter(self, event):
966 """ Imports character XML file from EVE API """

Callers 2

importFromClipboardMethod · 0.95
importFittingMethod · 0.80

Calls 2

sortMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected