(self, fits)
| 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 """ |
no test coverage detected