Fix setting implant set for character implants (#1284)
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user