Save recent projects by their ID instead of path (#2217)

This commit is contained in:
Veronica Berglyd Olsen
2025-01-30 23:11:10 +01:00
parent f10328803c
commit f686ec6a5a
3 changed files with 36 additions and 27 deletions
+2 -6
View File
@@ -353,9 +353,7 @@ class NWProject:
# Update recent projects
if storePath := self._storage.storagePath:
CONFIG.recentProjects.update(
storePath, self._data.name, sum(self._data.initCounts), time()
)
CONFIG.recentProjects.update(storePath, self._data, time())
# Check the project tree consistency
# This also handles any orphaned files found
@@ -421,9 +419,7 @@ class NWProject:
# Update recent projects
if storagePath := self._storage.storagePath:
CONFIG.recentProjects.update(
storagePath, self._data.name, sum(self._data.currCounts), saveTime
)
CONFIG.recentProjects.update(storagePath, self._data, saveTime)
SHARED.newStatusMessage(self.tr("Saved Project: {0}").format(self._data.name))
self.setProjectChanged(False)