diff --git a/sohstationviewer/view/main_window.py b/sohstationviewer/view/main_window.py index 34bbeaaecd07f1992713aac46a570b25b27990e7..5b52a4d45346f025f7e1d9593c08f8788c849260 100755 --- a/sohstationviewer/view/main_window.py +++ b/sohstationviewer/view/main_window.py @@ -954,7 +954,12 @@ class MainWindow(QtWidgets.QMainWindow, UIMainWindow): self.sdata_radio_button.setEnabled(False) try: self.rt130_das_dict = rt130_find_cf_dass(path) - if len(self.rt130_das_dict) != 0: + if self.log_checkbox.isChecked(): + for dent in pathlib.Path(path).iterdir(): + if dent.is_file() and dent.name.endswith('.log'): + self.open_files_list.addItem(FileListItem(dent)) + + elif len(self.rt130_das_dict) != 0: for rt130_das in self.rt130_das_dict: self.open_files_list.addItem(FileListItem(rt130_das)) @@ -968,10 +973,6 @@ class MainWindow(QtWidgets.QMainWindow, UIMainWindow): # Baler/B44 memory stick self.data_radio_button.setEnabled(True) self.sdata_radio_button.setEnabled(True) - elif self.log_checkbox.isChecked(): - for dent in pathlib.Path(path).iterdir(): - if dent.is_file() and dent.name.endswith('.log'): - self.open_files_list.addItem(FileListItem(dent)) else: for dent in pathlib.Path(path).iterdir(): if not dent.is_dir() or dent.name.startswith('.'):