Add the file filter function where needed

This commit is contained in:
Veronica Berglyd Olsen
2024-02-11 20:59:29 +01:00
parent 642b5e3681
commit 701fe29de9
5 changed files with 16 additions and 24 deletions
+1 -1
View File
@@ -381,7 +381,7 @@ class GuiWritingStats(QDialog):
# Generate the file name
savePath = CONFIG.lastPath() / f"sessionStats.{fileExt}"
savePath, _ = QFileDialog.getSaveFileName(
self, self.tr("Save Data As"), str(savePath), "%s (*.%s)" % (textFmt, fileExt)
self, self.tr("Save Data As"), str(savePath), f"{textFmt} (*.{fileExt})"
)
if not savePath:
return False