[bugfix] Thomas commit append an .in to every input file (e.g. pylot.in.in)
This commit is contained in:
parent
a90ef26344
commit
0995350697
@ -4219,13 +4219,15 @@ class PylotParaBox(QtGui.QWidget):
|
|||||||
def saveFile(self):
|
def saveFile(self):
|
||||||
fd = QtGui.QFileDialog()
|
fd = QtGui.QFileDialog()
|
||||||
fname = fd.getSaveFileName(self, 'Browse for settings file.',
|
fname = fd.getSaveFileName(self, 'Browse for settings file.',
|
||||||
filter='PyLoT input file (*.in)')
|
filter='PyLoT input file (*.in)')[0]
|
||||||
if fname[0]:
|
if fname:
|
||||||
|
if not fname.endswith('.in'):
|
||||||
|
fname += '.in'
|
||||||
try:
|
try:
|
||||||
self.params_from_gui()
|
self.params_from_gui()
|
||||||
self.parameter.export2File(fname[0] + ".in")
|
self.parameter.export2File(fname)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self._warn('Could not save file {}:\n{}'.format(fname[0]+ ".in", e))
|
self._warn('Could not save file {}:\n{}'.format(fname, e))
|
||||||
return
|
return
|
||||||
|
|
||||||
def restoreDefaults(self):
|
def restoreDefaults(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user