Change lastPath to a Path object

This commit is contained in:
Veronica Berglyd Olsen
2022-11-09 18:21:40 +01:00
parent 9d3291aba6
commit 47b57172eb
13 changed files with 45 additions and 71 deletions
+2 -2
View File
@@ -698,7 +698,7 @@ class GuiMain(QMainWindow):
logger.error("No project open")
return False
lastPath = self.mainConf.lastPath
lastPath = self.mainConf.getLastPath()
extFilter = [
self.tr("Text files ({0})").format("*.txt"),
self.tr("Markdown files ({0})").format("*.md"),
@@ -706,7 +706,7 @@ class GuiMain(QMainWindow):
self.tr("All files ({0})").format("*"),
]
loadFile, _ = QFileDialog.getOpenFileName(
self, self.tr("Import File"), lastPath, filter=";;".join(extFilter)
self, self.tr("Import File"), str(lastPath), filter=";;".join(extFilter)
)
if not loadFile:
return False