Fix fit XML export
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user