Fix alternative save path in build, and also add in project wizard

This commit is contained in:
Veronica K. B. Olsen
2021-04-26 18:22:16 +02:00
parent 6ecf0ecd88
commit e2b62fc9f6
3 changed files with 4 additions and 3 deletions
+1
View File
@@ -42,3 +42,4 @@ ToC.txt
# Coverage
/.coverage
/coverage.*
+2 -2
View File
@@ -853,10 +853,10 @@ class GuiBuildNovel(QDialog):
cleanName = makeFileNameSafe(self.theProject.projName)
fileName = "%s.%s" % (cleanName, fileExt)
saveDir = self.mainConf.lastPath
savePath = os.path.join(saveDir, fileName)
if not os.path.isdir(saveDir):
saveDir = self.mainConf.homePath
saveDir = os.path.expanduser("~")
savePath = os.path.join(saveDir, fileName)
savePath, _ = QFileDialog.getSaveFileName(
self, self.tr("Save Document As"), savePath
)
+1 -1
View File
@@ -210,7 +210,7 @@ class ProjWizardFolderPage(QWizardPage):
"""
lastPath = self.mainConf.lastPath
if not os.path.isdir(lastPath):
lastPath = ""
lastPath = os.path.expanduser("~")
projDir = QFileDialog.getExistingDirectory(
self, self.tr("Select Project Folder"), lastPath, options=QFileDialog.ShowDirsOnly