mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-06 10:18:42 +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.
|
available.
|
||||||
"""
|
"""
|
||||||
if not self._updatedRecentProjectFilesThumbnails:
|
if not self._updatedRecentProjectFilesThumbnails:
|
||||||
self._recentProjectFiles = self._getRecentProjectFiles()
|
self._updateRecentProjectFilesThumbnails()
|
||||||
self._updatedRecentProjectFilesThumbnails = True
|
self._updatedRecentProjectFilesThumbnails = True
|
||||||
|
|
||||||
|
def _updateRecentProjectFilesThumbnails(self) -> None:
|
||||||
|
for project in self._recentProjectFiles:
|
||||||
|
path = project["path"]
|
||||||
|
project["thumbnail"] = self._retrieveThumbnailPath(path)
|
||||||
|
|
||||||
@Slot(str)
|
@Slot(str)
|
||||||
@Slot(QUrl)
|
@Slot(QUrl)
|
||||||
def addRecentProjectFile(self, projectFile) -> None:
|
def addRecentProjectFile(self, projectFile) -> None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue