Fix fit XML export

This commit is contained in:
DarkPhoenix
2019-03-25 10:07:23 +03:00
parent be579cfaeb
commit 37ad2faa8e
4 changed files with 6 additions and 6 deletions

View File

@@ -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)
EfsPort.exportEfs(fit, 0, callback)

View File

@@ -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:

View File

@@ -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

View File

@@ -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