From 37ad2faa8e79a13dd415554661546872e615e828 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Mon, 25 Mar 2019 10:07:23 +0300 Subject: [PATCH] Fix fit XML export --- gui/copySelectDialog.py | 4 ++-- gui/mainFrame.py | 2 +- service/port/port.py | 4 ++-- service/port/xml.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gui/copySelectDialog.py b/gui/copySelectDialog.py index 985b98d01..55b02e535 100644 --- a/gui/copySelectDialog.py +++ b/gui/copySelectDialog.py @@ -174,7 +174,7 @@ class CopySelectDialog(wx.Dialog): def exportXml(self, options, callback): fit = getFit(self.mainFrame.getActiveFit()) - Port.exportXml(None, fit, callback) + Port.exportXml([fit], None, callback) def exportMultiBuy(self, options, callback): fit = getFit(self.mainFrame.getActiveFit()) @@ -182,4 +182,4 @@ class CopySelectDialog(wx.Dialog): def exportEfs(self, options, callback): fit = getFit(self.mainFrame.getActiveFit()) - EfsPort.exportEfs(fit, 0, callback) \ No newline at end of file + EfsPort.exportEfs(fit, 0, callback) diff --git a/gui/mainFrame.py b/gui/mainFrame.py index 78126fa80..a185bc96a 100644 --- a/gui/mainFrame.py +++ b/gui/mainFrame.py @@ -418,7 +418,7 @@ class MainFrame(wx.Frame): format_ = dlg.GetFilterIndex() path = dlg.GetPath() if format_ == 0: - output = Port.exportXml(None, fit) + output = Port.exportXml([fit], None) if '.' not in os.path.basename(path): path += ".xml" else: diff --git a/service/port/port.py b/service/port/port.py index 1f961f6c1..a82f6c27b 100644 --- a/service/port/port.py +++ b/service/port/port.py @@ -284,8 +284,8 @@ class Port(object): return importXml(text, iportuser) @staticmethod - def exportXml(iportuser=None, callback=None, *fits): - return exportXml(iportuser, callback=callback, *fits) + def exportXml(fits, iportuser=None, callback=None): + return exportXml(fits, iportuser, callback=callback) # Multibuy-related methods @staticmethod diff --git a/service/port/xml.py b/service/port/xml.py index 0e1f1e9ed..5d577f8f7 100644 --- a/service/port/xml.py +++ b/service/port/xml.py @@ -226,7 +226,7 @@ def importXml(text, iportuser): return fit_list -def exportXml(iportuser, callback, *fits): +def exportXml(fits, iportuser, callback): doc = xml.dom.minidom.Document() fittings = doc.createElement("fittings") # fit count