Offload actual set adding logic to windows calling the context menu

This commit is contained in:
DarkPhoenix
2019-07-30 22:01:33 +03:00
parent c4009bdbd7
commit 77ae235385
3 changed files with 18 additions and 20 deletions

View File

@@ -708,6 +708,16 @@ class ImplantEditorView(BaseImplantEditorView):
sChar.removeImplant(char.ID, implant)
def addImplantSet(self, impSet):
charEditor = self.Parent.Parent
char = charEditor.entityEditor.getActiveEntity()
sChar = Character.getInstance()
for implant in impSet.implants:
sChar.addImplant(char.ID, implant.item.ID)
wx.PostEvent(charEditor, GE.CharChanged())
def spawnMenu(self, event):
context = (("implantEditor",),)
menu = ContextMenu.getMenu(self, None, None, *context)