[qt6][ui] Limit useless calls to recentProjectFiles when opening dialogs

This prevents emitting signals that lead to countless updates when a
single one is necessary, thus causing some freezes in the interface.
This commit is contained in:
Candice Bentéjac 2024-11-21 11:19:38 +00:00
parent d63f7f2575
commit 9af6adeba9
2 changed files with 13 additions and 5 deletions

View file

@ -354,6 +354,7 @@ class MeshroomApp(QApplication):
p = {"path": p, "thumbnail": thumbnail}
projects.append(p)
settings.endArray()
settings.endGroup()
return projects
@Slot(str)
@ -393,6 +394,7 @@ class MeshroomApp(QApplication):
settings.setArrayIndex(i)
settings.setValue("filepath", p)
settings.endArray()
settings.endGroup()
settings.sync()
self.recentProjectFilesChanged.emit()