Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 955d7b5079dd06153c217beba6bcd5826f84bd3f Mon Sep 17 00:00:00 2001
- From: Lucas Thode <lthode@mail.unomaha.edu>
- Date: Wed, 27 Oct 2010 16:15:37 -0500
- Subject: [PATCH] fixed bug in file-extension handling on export
- ---
- eos | 2 +-
- gui/mainFrame.py | 10 +++++++---
- 2 files changed, 8 insertions(+), 4 deletions(-)
- diff --git a/eos b/eos
- index fe29779..0412e75 160000
- --- a/eos
- +++ b/eos
- @@ -1 +1 @@
- -Subproject commit fe2977950e020ed53d122840d55248a1b0b42c5e
- +Subproject commit 0412e75f2567c8c450199331409edcf978ba8d9d
- diff --git a/gui/mainFrame.py b/gui/mainFrame.py
- index 64f78ac..33b5fec 100644
- --- a/gui/mainFrame.py
- +++ b/gui/mainFrame.py
- @@ -183,10 +183,12 @@ class MainFrame(wx.Frame):
- path = dlg.GetPath()
- if (format == 0):
- output = sFit.exportFit(self.getActiveFit())
- - path += ".cfg"
- + if not path.endswith(".cfg"):
- + path += ".cfg"
- elif (format == 1):
- output = sFit.exportXml(self.getActiveFit())
- - path += ".xml"
- + if not path.endswith(".xml"):
- + path += ".xml"
- else:
- print "oops, invalid fit format %d" % format
- dlg.Destroy()
- @@ -279,7 +281,9 @@ class MainFrame(wx.Frame):
- style = wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT)
- if (saveDialog.ShowModal() == wx.ID_OK):
- filePath = saveDialog.GetPath()
- - sFit.backupFits(filePath)
- + if not filePath.endswith(".xml"):
- + filePath += ".xml"
- + sFit.backupFits(filePath )
- saveDialog.Destroy()
- def toggleShipBrowser(self, event):
- --
- 1.7.1
Add Comment
Please, Sign In to add comment