diff --git a/gui/builtinContextMenus/implantSets.py b/gui/builtinContextMenus/implantSets.py index d553a6f8d..0ef7cb2ee 100644 --- a/gui/builtinContextMenus/implantSets.py +++ b/gui/builtinContextMenus/implantSets.py @@ -75,10 +75,10 @@ class ImplantSets(ContextMenu): if self.context == "implantEditor": # we are calling from character editor, the implant source is different sChar = Character.getInstance() - charID = self.selection.getActiveCharacter() + char = self.selection.entityEditor.getActiveEntity() for implant in set.implants: - sChar.addImplant(charID, implant.item.ID) + sChar.addImplant(char.ID, implant.item.ID) wx.PostEvent(self.selection, GE.CharChanged()) else: diff --git a/gui/characterEditor.py b/gui/characterEditor.py index e8b351f83..4a02d5994 100644 --- a/gui/characterEditor.py +++ b/gui/characterEditor.py @@ -153,7 +153,7 @@ class CharacterEditor(wx.Frame): self.viewsNBContainer = wx.Notebook(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0) self.sview = SkillTreeView(self.viewsNBContainer) - self.iview = ImplantEditorView(self.viewsNBContainer) + self.iview = ImplantEditorView(self.viewsNBContainer, self) self.aview = APIView(self.viewsNBContainer) self.viewsNBContainer.AddPage(self.sview, "Skills") @@ -615,10 +615,11 @@ class SkillTreeView(wx.Panel): class ImplantEditorView(BaseImplantEditorView): - def __init__(self, parent): + def __init__(self, parent, charEditor): BaseImplantEditorView.__init__(self, parent) self.determineEnabled() + charEditor.Bind(GE.CHAR_CHANGED, self.contextChanged) if "__WXGTK__" in wx.PlatformInfo: self.pluggedImplantsTree.Bind(wx.EVT_RIGHT_UP, self.scheduleMenu)