Make the closing + opening of projects from welcome screen a little smoother

This commit is contained in:
Veronica Berglyd Olsen
2024-02-01 21:22:12 +01:00
parent 54f36d4e8e
commit 27fa356846
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -1146,6 +1146,7 @@ class GuiMain(QMainWindow):
@pyqtSlot(Path)
def _openProject(self, path: Path) -> None:
"""Handle an open project request."""
qApp.processEvents()
self.openProject(path)
return
+3
View File
@@ -197,6 +197,9 @@ class GuiWelcome(QDialog):
def _openProjectPath(self, path: Path) -> None:
"""Emit a project open signal."""
if isinstance(path, Path):
# Hide before emitting the open project signal so that any
# close/backup dialogs don't pop up over it.
self.hide()
self.openProjectRequest.emit(path)
self.close()
return