From 3508d00c286a2e5b976ae37575235e902f95307b Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Fri, 13 Feb 2015 11:24:27 +0100 Subject: [PATCH] catch case where no filename for the actual opened event is defined --- QtPyLoT.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/QtPyLoT.py b/QtPyLoT.py index 279696ed..5ef00fb2 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -319,6 +319,9 @@ class MainWindow(QMainWindow): self.data.exportEvent(self.fname, exform) except FormatError: return False + except AttributeError: + fname, = QFileDialog.getSaveFileName(self, 'Save event') + self.data.exportEvent(fname, exform) return True def getComponent(self):