added flag to FileDialog for open and save mode; fixes T251

This commit is contained in:
Dominik Demuth
2023-01-10 18:40:57 +01:00
parent e306be3001
commit a98f454942
2 changed files with 3 additions and 2 deletions

View File

@ -529,7 +529,7 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow):
if path is None:
path = ''
outfile = None
f = FileDialog(caption='Export graphic', directory=str(path), filter=filters)
f = FileDialog(caption='Export graphic', directory=str(path), filter=filters, mode='save')
mode = f.exec()
if mode == QtWidgets.QDialog.Accepted:
outfile = f.save_file()