bugfix: return value of QFileDialog method calls must be handled carefully
This commit is contained in:
parent
5c9f17bce3
commit
82ac85d743
@ -298,6 +298,9 @@ class MainWindow(QMainWindow):
|
|||||||
"Select waveform "
|
"Select waveform "
|
||||||
"files:",
|
"files:",
|
||||||
dir=searchPath)
|
dir=searchPath)
|
||||||
|
if isinstance(fnames[0], list):
|
||||||
|
self.fnames = fnames[0]
|
||||||
|
else:
|
||||||
self.fnames = fnames
|
self.fnames = fnames
|
||||||
|
|
||||||
else:
|
else:
|
||||||
@ -319,7 +322,7 @@ class MainWindow(QMainWindow):
|
|||||||
except FormatError:
|
except FormatError:
|
||||||
return False
|
return False
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
fname, = QFileDialog.getSaveFileName(self, 'Save event')
|
fname = QFileDialog.getSaveFileName(self, 'Save event')
|
||||||
self.data.exportEvent(fname, exform)
|
self.data.exportEvent(fname, exform)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user