[bugfix] return when no file is selected on load_data

This commit is contained in:
Marcel Paffrath 2017-06-26 14:10:40 +02:00
parent c07642653d
commit 42c288ad82

View File

@ -669,6 +669,8 @@ class MainWindow(QMainWindow):
action = self.sender() action = self.sender()
if isinstance(action, QAction): if isinstance(action, QAction):
fname = self.filename_from_action(action) fname = self.filename_from_action(action)
if not fname:
return
self.set_fname(fname, type) self.set_fname(fname, type)
data = dict(auto=self.autodata, manual=self.data) data = dict(auto=self.autodata, manual=self.data)
data[type] += Data(self, evtdata=fname) data[type] += Data(self, evtdata=fname)