[refs #137] bugfix value now is specified by user on demand
This commit is contained in:
parent
30ccd331d4
commit
060bc1d0c8
15
QtPyLoT.py
15
QtPyLoT.py
@ -907,10 +907,21 @@ class MainWindow(QMainWindow):
|
|||||||
if locroot is None:
|
if locroot is None:
|
||||||
self.PyLoTprefs()
|
self.PyLoTprefs()
|
||||||
self.locateEvent()
|
self.locateEvent()
|
||||||
|
|
||||||
infile = settings.value("{0}/inputFile".format(loctool), None)
|
infile = settings.value("{0}/inputFile".format(loctool), None)
|
||||||
|
|
||||||
|
if not infile:
|
||||||
|
caption = 'Select {0} input file'.format(loctool)
|
||||||
|
filt = "Supported file formats" \
|
||||||
|
" (*.in *.ini *.conf *.cfg)"
|
||||||
|
ans = QFileDialog().getOpenFileName(self, caption=caption,
|
||||||
|
filter=filt, dir=locroot)
|
||||||
|
infile = ans[0]
|
||||||
|
settings.setValue("{0}/inputFile".format(loctool), infile)
|
||||||
|
settings.sync()
|
||||||
outfile = settings.value("{0}/outputFile".format(loctool), None)
|
outfile = settings.value("{0}/outputFile".format(loctool), None)
|
||||||
phasepath = os.tempnam(os.path.join(locroot, 'obs'), loctool)
|
phasefile = os.path.split(os.tempnam())[-1]
|
||||||
phasefile = os.path.split(phasepath)[-1]
|
phasepath = os.path.join(locroot, 'obs', phasefile)
|
||||||
locpath = os.path.join(locroot, 'loc', outfile)
|
locpath = os.path.join(locroot, 'loc', outfile)
|
||||||
lt.export(self.getPicks(), phasepath)
|
lt.export(self.getPicks(), phasepath)
|
||||||
lt.modify_inputs(infile, locroot, outfile, phasefile, )
|
lt.modify_inputs(infile, locroot, outfile, phasefile, )
|
||||||
|
Loading…
Reference in New Issue
Block a user