From 42c288ad82950ed856788b6d15db4fab8016e45b Mon Sep 17 00:00:00 2001 From: Marcel Paffrath Date: Mon, 26 Jun 2017 14:10:40 +0200 Subject: [PATCH] [bugfix] return when no file is selected on load_data --- QtPyLoT.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/QtPyLoT.py b/QtPyLoT.py index 9a51873b..e608cc75 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -669,6 +669,8 @@ class MainWindow(QMainWindow): action = self.sender() if isinstance(action, QAction): fname = self.filename_from_action(action) + if not fname: + return self.set_fname(fname, type) data = dict(auto=self.autodata, manual=self.data) data[type] += Data(self, evtdata=fname)