From 1c2c8cc5f97cfb9610640d59cb74a38f51f5d6fc Mon Sep 17 00:00:00 2001 From: Gochim <54093496+Gochim@users.noreply.github.com> Date: Sun, 20 Oct 2019 15:25:06 +0300 Subject: [PATCH] Added UI for new type of copying data about fit to the clipboard --- gui/copySelectDialog.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/gui/copySelectDialog.py b/gui/copySelectDialog.py index 7700c79cd..fc64aa91a 100644 --- a/gui/copySelectDialog.py +++ b/gui/copySelectDialog.py @@ -40,6 +40,7 @@ class CopySelectDialog(wx.Dialog): copyFormatEsi = 3 copyFormatMultiBuy = 4 copyFormatEfs = 5 + copyFormatFitStats = 6 def __init__(self, parent): super().__init__(parent, id=wx.ID_ANY, title="Select a format", size=(-1, -1), style=wx.DEFAULT_DIALOG_STYLE) @@ -50,7 +51,8 @@ class CopySelectDialog(wx.Dialog): CopySelectDialog.copyFormatDna : self.exportDna, CopySelectDialog.copyFormatEsi : self.exportEsi, CopySelectDialog.copyFormatMultiBuy: self.exportMultiBuy, - CopySelectDialog.copyFormatEfs : self.exportEfs + CopySelectDialog.copyFormatEfs : self.exportEfs, + CopySelectDialog.copyFormatFitStats: self.exportFitStats } self.mainFrame = parent @@ -62,6 +64,7 @@ class CopySelectDialog(wx.Dialog): ("ESI", (CopySelectDialog.copyFormatEsi, None)), ("DNA", (CopySelectDialog.copyFormatDna, DNA_OPTIONS)), ("EFS", (CopySelectDialog.copyFormatEfs, None)), + ("Fit Stats", (CopySelectDialog.copyFormatFitStats, None)), # ("XML", (CopySelectDialog.copyFormatXml, None)), )) @@ -117,7 +120,7 @@ class CopySelectDialog(wx.Dialog): self.Center() def Validate(self): - # Since this dialog is shown through aa ShowModal(), we hook into the Validate function to veto the closing of the dialog until we're ready. + # Since this dialog is shown through as ShowModal(), we hook into the Validate function to veto the closing of the dialog until we're ready. # This always returns False, and when we're ready will EndModal() selected = self.GetSelected() options = self.GetOptions() @@ -185,3 +188,9 @@ class CopySelectDialog(wx.Dialog): def exportEfs(self, options, callback): fit = getFit(self.mainFrame.getActiveFit()) EfsPort.exportEfs(fit, 0, callback) + + """ + Puts fit stats in textual format into the clipboard + """ + def exportFitStats(self, options, callback): + pass