From 0dc9d96497ab6a7eec54f74a83cb8a7cf2a153e6 Mon Sep 17 00:00:00 2001
From: kienle <kienle@passcal.nmt.edu>
Date: Mon, 11 Sep 2023 16:23:25 -0600
Subject: [PATCH] Prioritize showing log files

---
 sohstationviewer/view/main_window.py | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/sohstationviewer/view/main_window.py b/sohstationviewer/view/main_window.py
index 34bbeaaec..5b52a4d45 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('.'):
-- 
GitLab