diff --git a/sohstationviewer/view/main_window.py b/sohstationviewer/view/main_window.py index b58473088914d6260acfaf6ff348ecd9b1aab4bc..75caa7184c9f5d78d5a23b782c11ab094234fde9 100755 --- a/sohstationviewer/view/main_window.py +++ b/sohstationviewer/view/main_window.py @@ -424,11 +424,9 @@ class MainWindow(QtWidgets.QMainWindow, UIMainWindow): fd.setFileMode(QtWidgets.QFileDialog.FileMode.Directory) fd.setDirectory(self.curr_dir_line_edit.text()) fd.exec() - try: + if fd.result() == QtWidgets.QDialog.DialogCode.Accepted: new_path = fd.selectedFiles()[0] self.set_current_directory(new_path) - except IndexError: - pass @QtCore.Slot() def plot_diff_data_set_id(self):