mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-04 01:08:26 +02:00
[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:
parent
041c643be6
commit
de7777f8b0
1 changed files with 6 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue