mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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>
This commit is contained in:
parent
ebaa7d1fd0
commit
2dd5781afe
1 changed files with 4 additions and 0 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Reference in a new issue