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):
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
......