Allow pasting non-mutated modules via ctrl-v
This commit is contained in:
@@ -747,9 +747,12 @@ class MainFrame(wx.Frame):
|
||||
activeFit = self.getActiveFit()
|
||||
try:
|
||||
importType, importData = Port().importFitFromBuffer(clipboard, activeFit)
|
||||
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.GuiImportLocalMutatedModuleCommand(activeFit, *importData[0]))
|
||||
if importType == "FittingItem":
|
||||
baseItem, mutaplasmidItem, mutations = importData[0]
|
||||
if mutaplasmidItem:
|
||||
self.command.Submit(cmd.GuiImportLocalMutatedModuleCommand(activeFit, baseItem, mutaplasmidItem, mutations))
|
||||
else:
|
||||
self.command.Submit(cmd.GuiAddLocalModuleCommand(activeFit, baseItem.ID))
|
||||
return
|
||||
if importType == "AdditionsDrones":
|
||||
if self.command.Submit(cmd.GuiImportLocalDronesCommand(activeFit, [(i.ID, a) for i, a in importData[0]])):
|
||||
|
||||
@@ -256,8 +256,8 @@ class Port:
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
if baseItem is not None and mutaplasmidItem is not None:
|
||||
return "MutatedItem", False, ((baseItem, mutaplasmidItem, mutations),)
|
||||
if baseItem is not None:
|
||||
return "FittingItem", False, ((baseItem, mutaplasmidItem, mutations),)
|
||||
# Try to import into one of additions panels
|
||||
isDrone, droneData = isValidDroneImport(string)
|
||||
if isDrone:
|
||||
|
||||
Reference in New Issue
Block a user