Update current usage of last path
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user