Do some work on mutated module commands to support new parsing format

This commit is contained in:
DarkPhoenix
2018-11-20 13:38:38 +03:00
parent c619efa68e
commit 59d9d47a56
6 changed files with 106 additions and 76 deletions

View File

@@ -731,15 +731,16 @@ class MainFrame(wx.Frame):
clipboard = fromClipboard()
activeFit = self.getActiveFit()
try:
import_type, data = Port().importFitFromBuffer(clipboard, activeFit)
if import_type == "Abyssal":
importType, importData = Port().importFitFromBuffer(clipboard, activeFit)
# If it's mutated item - make sure there's at least base item specified
if importType == "MutatedItem":
# we've imported an Abyssal module, need to fire off the command to add it to the fit
self.command.Submit(cmd.GuiImportAbyssalModuleCommand(activeFit, data[0]))
self.command.Submit(cmd.GuiImportMutatedModuleCommand(activeFit, *importData[0]))
return # no need to do anything else
except:
pyfalog.error("Attempt to import failed:\n{0}", clipboard)
else:
self._openAfterImport(data)
self._openAfterImport(importData)
def exportToClipboard(self, event):
CopySelectDict = {CopySelectDialog.copyFormatEft: self.clipboardEft,