Skip to content

Commit

Permalink
fix last library loading
Browse files Browse the repository at this point in the history
  • Loading branch information
yedpodtrzitko committed May 13, 2024
1 parent 68a58eb commit fcb23d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tagstudio/src/qt/ts_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ def start(self):
lib = None
if self.args.open:
lib = self.args.open
elif self.settings.value(SettingItems.START_LOAD_LAST, type=bool):
elif self.settings.value(SettingItems.START_LOAD_LAST, True, type=bool):
lib = self.settings.value(SettingItems.LAST_LIBRARY)

if lib:
Expand Down Expand Up @@ -580,7 +580,7 @@ def shutdown(self):
"""Save Library on Application Exit"""
if self.lib.library_dir:
self.save_library()
self.settings.setValue("last_library", self.lib.library_dir)
self.settings.setValue(SettingItems.LAST_LIBRARY, self.lib.library_dir)
self.settings.sync()
logging.info("[SHUTDOWN] Ending Thumbnail Threads...")
for _ in self.thumb_threads:
Expand Down Expand Up @@ -629,7 +629,7 @@ def close_library(self):
self.main_window.statusbar.showMessage(f"Closing & Saving Library...")
start_time = time.time()
self.save_library(show_status=False)
self.settings.setValue("last_library", self.lib.library_dir)
self.settings.setValue(SettingItems.LAST_LIBRARY, self.lib.library_dir)
self.settings.sync()

self.lib.clear_internal_vars()
Expand Down

0 comments on commit fcb23d3

Please sign in to comment.