Do some work on mutated module commands to support new parsing format
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user