Added character saving.
Deleting characters is broken for now due to using wrong session, but I believe creating character works. Further tests needed
This commit is contained in:
@@ -94,6 +94,7 @@ class ChangeAffectingSkills(ContextMenu):
|
||||
fitID = self.mainFrame.getActiveFit()
|
||||
self.sFit.changeChar(fitID, self.charID)
|
||||
|
||||
wx.PostEvent(self.mainFrame, GE.CharListUpdated())
|
||||
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID))
|
||||
|
||||
ChangeAffectingSkills.register()
|
||||
|
||||
@@ -418,6 +418,8 @@ class MainFrame(wx.Frame):
|
||||
self.Bind(wx.EVT_MENU, self.goWiki, id = menuBar.wikiId)
|
||||
# EVE Forums
|
||||
self.Bind(wx.EVT_MENU, self.goForums, id = menuBar.forumId)
|
||||
# Save current character
|
||||
self.Bind(wx.EVT_MENU, self.saveChar, id = menuBar.saveCharId)
|
||||
|
||||
#Clipboard exports
|
||||
self.Bind(wx.EVT_MENU, self.exportToClipboard, id=wx.ID_COPY)
|
||||
@@ -482,6 +484,12 @@ class MainFrame(wx.Frame):
|
||||
atable = wx.AcceleratorTable(actb)
|
||||
self.SetAcceleratorTable(atable)
|
||||
|
||||
def saveChar(self, event):
|
||||
sChr = service.Character.getInstance()
|
||||
charID = self.charSelection.getActiveCharacter()
|
||||
sChr.saveCharacter(charID)
|
||||
wx.PostEvent(self, GE.CharListUpdated())
|
||||
|
||||
def AdditionsTabSelect(self, event):
|
||||
selTab = self.additionsSelect.index(event.GetId())
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ class MainMenuBar(wx.MenuBar):
|
||||
self.exportHtmlId = wx.NewId()
|
||||
self.wikiId = wx.NewId()
|
||||
self.forumId = wx.NewId()
|
||||
self.saveCharId = wx.NewId()
|
||||
|
||||
self.mainFrame = gui.mainFrame.MainFrame.getInstance()
|
||||
|
||||
@@ -70,6 +71,8 @@ class MainMenuBar(wx.MenuBar):
|
||||
pasteText = "&From Clipboard" + ("\tCTRL+V" if 'wxMSW' in wx.PlatformInfo else "")
|
||||
editMenu.Append(wx.ID_COPY, copyText, "Export a fit to the clipboard")
|
||||
editMenu.Append(wx.ID_PASTE, pasteText, "Import a fit from the clipboard")
|
||||
editMenu.AppendSeparator()
|
||||
editMenu.Append(self.saveCharId, "Save Character")
|
||||
|
||||
# Character menu
|
||||
windowMenu = wx.Menu()
|
||||
|
||||
Reference in New Issue
Block a user