Update current usage of last path

This commit is contained in:
Veronica Berglyd Olsen
2024-06-16 00:22:38 +02:00
parent 2a99cafbf2
commit 928a116666
5 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -220,8 +220,8 @@ class GuiWelcome(NDialog):
@pyqtSlot()
def _browseForProject(self) -> None:
"""Browse for a project to open."""
if path := SHARED.getProjectPath(self, path=CONFIG.lastPath(), allowZip=False):
CONFIG.setLastPath(path)
if path := SHARED.getProjectPath(self, path=CONFIG.lastPath("project"), allowZip=False):
CONFIG.setLastPath("project", path)
self._openProjectPath(path)
return
+2 -2
View File
@@ -384,14 +384,14 @@ class GuiWritingStats(NToolDialog):
return False
# Generate the file name
savePath = CONFIG.lastPath() / f"sessionStats.{fileExt}"
savePath = CONFIG.lastPath("stats") / f"sessionStats.{fileExt}"
savePath, _ = QFileDialog.getSaveFileName(
self, self.tr("Save Data As"), str(savePath), f"{textFmt} (*.{fileExt})"
)
if not savePath:
return False
CONFIG.setLastPath(savePath)
CONFIG.setLastPath("stats", savePath)
# Do the actual writing
wSuccess = False