diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-05-11 15:26:56 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-05-11 15:26:56 -0700 |
commit | 2dd5781afe19fa70d702eccd4462a4249cc4b1a8 (patch) | |
tree | ab8d104c76444241ae3e1deffac6932600918c0a /qt-ui/mainwindow.cpp | |
parent | ebaa7d1fd08fec3371e6448532564ebef6df4f29 (diff) | |
download | subsurface-2dd5781afe19fa70d702eccd4462a4249cc4b1a8.tar.gz |
Make sure that the save file dialog actually is marked as such
While this worked on Linux, on the Mac we didn't have an input field to
enter the file name. With this we explicitly declare that this is a file
save dialog and that the user can specify a non-existing file name.
Fixes #872
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index f8ab75a75..97c68af8e 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -1296,8 +1296,12 @@ int MainWindow::file_save_as(void) { QString filename; const char *default_filename = existing_filename; + + // create a file dialog that allows us to save to a new file QFileDialog selection_dialog(this, tr("Save file as"), default_filename, tr("Subsurface XML files (*.ssrf *.xml *.XML)")); + selection_dialog.setAcceptMode(QFileDialog::AcceptSave); + selection_dialog.setFileMode(QFileDialog::AnyFile); /* if the exit/cancel button is pressed return */ if (!selection_dialog.exec()) |