Implemented copying the currently open fit stats to the clipboard.

This commit is contained in:
Alexander Maryanovsky
2018-09-08 15:06:31 +03:00
committed by Gochim
parent 9e78cd1076
commit 58f853de5b
3 changed files with 189 additions and 0 deletions

View File

@@ -81,6 +81,8 @@ except ImportError as e:
pyfalog.warning("Error loading Attribute Editor: %s.\nAccess to Attribute Editor is disabled." % e.message)
disableOverrideEditor = True
pyfalog = Logger(__name__)
pyfalog.debug("Done loading mainframe imports")
@@ -549,6 +551,7 @@ class MainFrame(wx.Frame):
# Clipboard exports
self.Bind(wx.EVT_MENU, self.exportToClipboard, id=wx.ID_COPY)
self.Bind(wx.EVT_MENU, self.exportFitStatsToClipboard, id=menuBar.fitStatsToClipboardId)
# Fitting Restrictions
self.Bind(wx.EVT_MENU, self.toggleIgnoreRestriction, id=menuBar.toggleIgnoreRestrictionID)
@@ -780,6 +783,12 @@ class MainFrame(wx.Frame):
with CopySelectDialog(self) as dlg:
dlg.ShowModal()
def exportFitStatsToClipboard(self, event):
""" Puts fit stats in textual format into the clipboard"""
fit = db_getFit(self.getActiveFit())
if fit:
toClipboard(statsExportText(fit))
def exportSkillsNeeded(self, event):
""" Exports skills needed for active fit and active character """
sCharacter = Character.getInstance()