Fix bug with char copy, and added char revert and save as (unfinished)

This commit is contained in:
blitzmann
2015-09-24 18:16:12 -04:00
parent ae870f9535
commit 61614553a2
4 changed files with 51 additions and 6 deletions

View File

@@ -420,6 +420,10 @@ class MainFrame(wx.Frame):
self.Bind(wx.EVT_MENU, self.goForums, id = menuBar.forumId)
# Save current character
self.Bind(wx.EVT_MENU, self.saveChar, id = menuBar.saveCharId)
# Save current character as another character
self.Bind(wx.EVT_MENU, self.saveCharAs, id = menuBar.saveCharAsId)
# Save current character
self.Bind(wx.EVT_MENU, self.revertChar, id = menuBar.revertCharId)
#Clipboard exports
self.Bind(wx.EVT_MENU, self.exportToClipboard, id=wx.ID_COPY)
@@ -490,6 +494,18 @@ class MainFrame(wx.Frame):
sChr.saveCharacter(charID)
wx.PostEvent(self, GE.CharListUpdated())
def saveCharAs(self, event):
sChr = service.Character.getInstance()
charID = self.charSelection.getActiveCharacter()
sChr.saveCharacterAs(charID)
wx.PostEvent(self, GE.CharListUpdated())
def revertChar(self, event):
sChr = service.Character.getInstance()
charID = self.charSelection.getActiveCharacter()
sChr.revertCharacter(charID)
wx.PostEvent(self, GE.CharListUpdated())
def AdditionsTabSelect(self, event):
selTab = self.additionsSelect.index(event.GetId())