From 3842722d0e565b7c6ca3eb3daf641766f5cf8425 Mon Sep 17 00:00:00 2001 From: ldam <ldam@passcal.nmt.edu> Date: Tue, 25 Feb 2025 16:35:07 -0700 Subject: [PATCH 1/3] increase size of help --- sohstationviewer/view/help_view.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sohstationviewer/view/help_view.py b/sohstationviewer/view/help_view.py index a2c63c1d4..d90adb3f5 100644 --- a/sohstationviewer/view/help_view.py +++ b/sohstationviewer/view/help_view.py @@ -71,8 +71,8 @@ class HelpBrowser(QtWidgets.QWidget): screen size. """ - SCREEN_SIZE_SCALAR_X = 0.50 - SCREEN_SIZE_SCALAR_Y = 0.50 + SCREEN_SIZE_SCALAR_X = 0.75 + SCREEN_SIZE_SCALAR_Y = 0.75 TREE_VIEW_SCALAR = 0.25 def __init__( -- GitLab From 5c5303cf8b3f15028ec7053ea37f052465f3bd8e Mon Sep 17 00:00:00 2001 From: ldam <ldam@passcal.nmt.edu> Date: Tue, 4 Mar 2025 10:03:59 -0700 Subject: [PATCH 2/3] replace double quotes with single quotes for literal string to conform to SQLite syntax --- sohstationviewer/view/main_window.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sohstationviewer/view/main_window.py b/sohstationviewer/view/main_window.py index 6ee524b28..63239d441 100755 --- a/sohstationviewer/view/main_window.py +++ b/sohstationviewer/view/main_window.py @@ -1144,8 +1144,8 @@ class MainWindow(QtWidgets.QMainWindow, UIMainWindow): self.current_directory_changed.emit(path) self.current_dir = path self.save_plot_dir = path - execute_db(f'UPDATE PersistentData SET FieldValue="{path}" WHERE ' - 'FieldName="currentDirectory"') + execute_db(f"UPDATE PersistentData SET FieldValue='{path}' WHERE " + "FieldName='currentDirectory'") self.set_open_files_list_texts() def set_open_files_list_texts(self): @@ -1211,8 +1211,8 @@ class MainWindow(QtWidgets.QMainWindow, UIMainWindow): Set current directory with info saved in DB """ rows = execute_db_dict( - 'SELECT FieldName, FieldValue FROM PersistentData ' - 'WHERE FieldName="currentDirectory"') + "SELECT FieldName, FieldValue FROM PersistentData " + "WHERE FieldName='currentDirectory'") if len(rows) > 0 and rows[0]['FieldValue']: self.set_current_directory(rows[0]['FieldValue']) @@ -1302,14 +1302,14 @@ class MainWindow(QtWidgets.QMainWindow, UIMainWindow): SOHView wasn't closed correctly. """ rows = execute_db( - 'SELECT FieldValue FROM PersistentData ' - 'WHERE FieldName="tempDataDirectory"') + "SELECT FieldValue FROM PersistentData " + "WHERE FieldName='tempDataDirectory'") temp_data_folder = rows[0][0] try: shutil.rmtree(temp_data_folder) execute_db( - f'UPDATE PersistentData SET FieldValue="{None}" WHERE' - f' FieldName="tempDataDirectory"' + f"UPDATE PersistentData SET FieldValue='{None}' WHERE" + f" FieldName='tempDataDirectory'" ) except (FileNotFoundError, TypeError): pass -- GitLab From 8bcb6c3976cdf5bef8883bd562252fc1fda7ff7c Mon Sep 17 00:00:00 2001 From: ldam <ldam@passcal.nmt.edu> Date: Tue, 4 Mar 2025 10:52:05 -0700 Subject: [PATCH 3/3] Revert "increase size of help" This reverts commit 3842722d0e565b7c6ca3eb3daf641766f5cf8425. --- sohstationviewer/view/help_view.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sohstationviewer/view/help_view.py b/sohstationviewer/view/help_view.py index d90adb3f5..a2c63c1d4 100644 --- a/sohstationviewer/view/help_view.py +++ b/sohstationviewer/view/help_view.py @@ -71,8 +71,8 @@ class HelpBrowser(QtWidgets.QWidget): screen size. """ - SCREEN_SIZE_SCALAR_X = 0.75 - SCREEN_SIZE_SCALAR_Y = 0.75 + SCREEN_SIZE_SCALAR_X = 0.50 + SCREEN_SIZE_SCALAR_Y = 0.50 TREE_VIEW_SCALAR = 0.25 def __init__( -- GitLab