Fix setting implant set for character implants (#1284)

This commit is contained in:
Ryan Holmes
2017-09-18 20:36:41 -04:00
committed by GitHub
parent 3625b4395a
commit 3e73c2eb34
2 changed files with 5 additions and 4 deletions

View File

@@ -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:

View File

@@ -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)