Open welcome dialog again if no project was opened
This commit is contained in:
@@ -796,7 +796,7 @@ class GuiMain(QMainWindow):
|
|||||||
def showWelcomeDialog(self) -> None:
|
def showWelcomeDialog(self) -> None:
|
||||||
"""Open the welcome dialog."""
|
"""Open the welcome dialog."""
|
||||||
dialog = GuiWelcome(self)
|
dialog = GuiWelcome(self)
|
||||||
dialog.openProjectRequest.connect(self._openProject)
|
dialog.openProjectRequest.connect(self._openProjectFromWelcome)
|
||||||
dialog.exec_()
|
dialog.exec_()
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -1132,10 +1132,12 @@ class GuiMain(QMainWindow):
|
|||||||
return
|
return
|
||||||
|
|
||||||
@pyqtSlot(Path)
|
@pyqtSlot(Path)
|
||||||
def _openProject(self, path: Path) -> None:
|
def _openProjectFromWelcome(self, path: Path) -> None:
|
||||||
"""Handle an open project request."""
|
"""Handle an open project request from the welcome dialog."""
|
||||||
qApp.processEvents()
|
qApp.processEvents()
|
||||||
self.openProject(path)
|
self.openProject(path)
|
||||||
|
if not SHARED.hasProject:
|
||||||
|
self.showWelcomeDialog()
|
||||||
return
|
return
|
||||||
|
|
||||||
@pyqtSlot(str, nwDocMode, str, bool)
|
@pyqtSlot(str, nwDocMode, str, bool)
|
||||||
|
|||||||
Reference in New Issue
Block a user