Changed the way creating new, and closing projects is done to make it more roubust

This commit is contained in:
Veronica K. B. Olsen
2019-05-24 00:37:45 +02:00
parent 85a09f936e
commit ad79b60961
9 changed files with 255 additions and 39 deletions
+7 -1
View File
@@ -137,7 +137,7 @@ class GuiMainMenu(QMenuBar):
# Project > New Project
menuItem = QAction(QIcon.fromTheme("folder-new"), "New Project", self)
menuItem.setStatusTip("Create New Project")
menuItem.triggered.connect(self.theParent.newProject)
menuItem.triggered.connect(lambda : self.theParent.newProject(None))
self.projMenu.addAction(menuItem)
# Project > Open Project
@@ -154,6 +154,12 @@ class GuiMainMenu(QMenuBar):
menuItem.triggered.connect(self.theParent.saveProject)
self.projMenu.addAction(menuItem)
# Project > Close Project
menuItem = QAction("Close Project", self)
menuItem.setStatusTip("Close Project")
menuItem.triggered.connect(lambda : self.theParent.closeProject(False))
self.projMenu.addAction(menuItem)
# Project > Recent Projects
self.recentMenu = self.projMenu.addMenu(QIcon.fromTheme("document-open-recent"),"Recent Projects")
self.updateRecentProjects()