Fixed a little annoying bit about dialogs and tests

This commit is contained in:
Veronica K. B. Olsen
2019-05-25 23:40:17 +02:00
parent 6530a162fb
commit 7450604c1b
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -157,7 +157,7 @@ class GuiMainMenu(QMenuBar):
menuItem = QAction(QIcon.fromTheme("document-revert"), "Close Project", self)
menuItem.setStatusTip("Close Project")
menuItem.setShortcut("Ctrl+Shift+W")
menuItem.triggered.connect(lambda : self.theParent.closeProject(False))
menuItem.triggered.connect(self.theParent.closeProject)
self.projMenu.addAction(menuItem)
# Project > Recent Projects
+2 -2
View File
@@ -214,12 +214,12 @@ class GuiMain(QMainWindow):
return True
def closeProject(self, isYes=False):
def closeProject(self):
if not self.hasProject:
return True
if not isYes:
if self.mainConf.showGUI:
msgBox = QMessageBox()
msgRes = msgBox.question(
self, "Close Project",
+1 -1
View File
@@ -27,7 +27,7 @@ def testMainWindows(qtbot, nwTempGUI, nwRef):
nwGUI.theProject.handleSeed = 42
assert nwGUI.newProject(nwTempGUI, True)
assert nwGUI.saveProject()
assert nwGUI.closeProject(True)
assert nwGUI.closeProject()
assert len(nwGUI.theProject.projTree) == 0
assert len(nwGUI.theProject.treeOrder) == 0