Fix alternative save path in build, and also add in project wizard
This commit is contained in:
@@ -42,3 +42,4 @@ ToC.txt
|
|||||||
|
|
||||||
# Coverage
|
# Coverage
|
||||||
/.coverage
|
/.coverage
|
||||||
|
/coverage.*
|
||||||
|
|||||||
+2
-2
@@ -853,10 +853,10 @@ class GuiBuildNovel(QDialog):
|
|||||||
cleanName = makeFileNameSafe(self.theProject.projName)
|
cleanName = makeFileNameSafe(self.theProject.projName)
|
||||||
fileName = "%s.%s" % (cleanName, fileExt)
|
fileName = "%s.%s" % (cleanName, fileExt)
|
||||||
saveDir = self.mainConf.lastPath
|
saveDir = self.mainConf.lastPath
|
||||||
savePath = os.path.join(saveDir, fileName)
|
|
||||||
if not os.path.isdir(saveDir):
|
if not os.path.isdir(saveDir):
|
||||||
saveDir = self.mainConf.homePath
|
saveDir = os.path.expanduser("~")
|
||||||
|
|
||||||
|
savePath = os.path.join(saveDir, fileName)
|
||||||
savePath, _ = QFileDialog.getSaveFileName(
|
savePath, _ = QFileDialog.getSaveFileName(
|
||||||
self, self.tr("Save Document As"), savePath
|
self, self.tr("Save Document As"), savePath
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ class ProjWizardFolderPage(QWizardPage):
|
|||||||
"""
|
"""
|
||||||
lastPath = self.mainConf.lastPath
|
lastPath = self.mainConf.lastPath
|
||||||
if not os.path.isdir(lastPath):
|
if not os.path.isdir(lastPath):
|
||||||
lastPath = ""
|
lastPath = os.path.expanduser("~")
|
||||||
|
|
||||||
projDir = QFileDialog.getExistingDirectory(
|
projDir = QFileDialog.getExistingDirectory(
|
||||||
self, self.tr("Select Project Folder"), lastPath, options=QFileDialog.ShowDirsOnly
|
self, self.tr("Select Project Folder"), lastPath, options=QFileDialog.ShowDirsOnly
|
||||||
|
|||||||
Reference in New Issue
Block a user