Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • software_public/passoft/sohstationviewer
1 result
Show changes
Commits on Source (8)
...@@ -1144,8 +1144,8 @@ class MainWindow(QtWidgets.QMainWindow, UIMainWindow): ...@@ -1144,8 +1144,8 @@ class MainWindow(QtWidgets.QMainWindow, UIMainWindow):
self.current_directory_changed.emit(path) self.current_directory_changed.emit(path)
self.current_dir = path self.current_dir = path
self.save_plot_dir = path self.save_plot_dir = path
execute_db(f'UPDATE PersistentData SET FieldValue="{path}" WHERE ' execute_db(f"UPDATE PersistentData SET FieldValue='{path}' WHERE "
'FieldName="currentDirectory"') "FieldName='currentDirectory'")
self.set_open_files_list_texts() self.set_open_files_list_texts()
def set_open_files_list_texts(self): def set_open_files_list_texts(self):
...@@ -1211,8 +1211,8 @@ class MainWindow(QtWidgets.QMainWindow, UIMainWindow): ...@@ -1211,8 +1211,8 @@ class MainWindow(QtWidgets.QMainWindow, UIMainWindow):
Set current directory with info saved in DB Set current directory with info saved in DB
""" """
rows = execute_db_dict( rows = execute_db_dict(
'SELECT FieldName, FieldValue FROM PersistentData ' "SELECT FieldName, FieldValue FROM PersistentData "
'WHERE FieldName="currentDirectory"') "WHERE FieldName='currentDirectory'")
if len(rows) > 0 and rows[0]['FieldValue']: if len(rows) > 0 and rows[0]['FieldValue']:
self.set_current_directory(rows[0]['FieldValue']) self.set_current_directory(rows[0]['FieldValue'])
...@@ -1302,14 +1302,14 @@ class MainWindow(QtWidgets.QMainWindow, UIMainWindow): ...@@ -1302,14 +1302,14 @@ class MainWindow(QtWidgets.QMainWindow, UIMainWindow):
SOHView wasn't closed correctly. SOHView wasn't closed correctly.
""" """
rows = execute_db( rows = execute_db(
'SELECT FieldValue FROM PersistentData ' "SELECT FieldValue FROM PersistentData "
'WHERE FieldName="tempDataDirectory"') "WHERE FieldName='tempDataDirectory'")
temp_data_folder = rows[0][0] temp_data_folder = rows[0][0]
try: try:
shutil.rmtree(temp_data_folder) shutil.rmtree(temp_data_folder)
execute_db( execute_db(
f'UPDATE PersistentData SET FieldValue="{None}" WHERE' f"UPDATE PersistentData SET FieldValue='{None}' WHERE"
f' FieldName="tempDataDirectory"' f" FieldName='tempDataDirectory'"
) )
except (FileNotFoundError, TypeError): except (FileNotFoundError, TypeError):
pass pass
......