[ui] app: Don't read QSettings again when updating thumbnails for projects

There is no need to read the QSettings again as the content of
`self._recentProjectFiles` reflects their content accurately and they
do not store any thumbnail-related information.

QSettings will now only be read once, upon Meshroom's start.
This commit is contained in:
Candice Bentéjac 2025-01-03 17:53:21 +01:00
parent 041c643be6
commit de7777f8b0

View file

@ -413,9 +413,14 @@ class MeshroomApp(QApplication):
available.
"""
if not self._updatedRecentProjectFilesThumbnails:
self._recentProjectFiles = self._getRecentProjectFiles()
self._updateRecentProjectFilesThumbnails()
self._updatedRecentProjectFilesThumbnails = True
def _updateRecentProjectFilesThumbnails(self) -> None:
for project in self._recentProjectFiles:
path = project["path"]
project["thumbnail"] = self._retrieveThumbnailPath(path)
@Slot(str)
@Slot(QUrl)
def addRecentProjectFile(self, projectFile) -> None: