Implemented copying the currently open fit stats to the clipboard.
This commit is contained in:
committed by
Gochim
parent
9e78cd1076
commit
58f853de5b
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user