From ed6a42f6f2e4309edda0c7c02d8df229a32c9315 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 14 May 2014 06:13:03 +0900 Subject: Do not use default filename as default for "Save as" This may sound counterintuitive but it actually makes sense. If you have a default filename that's the name of you "normal working file". If you want "Save as" something, that by definition is NOT your normal working file but a subset or an experiment or something. And you most definitely do NOT want to overwrite your default file with that. Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 709693c30..f37b1c25d 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -965,12 +965,7 @@ void MainWindow::recentFileTriggered(bool checked) int MainWindow::file_save_as(void) { QString filename; - const char *default_filename; - - if (existing_filename) - default_filename = existing_filename; - else - default_filename = prefs.default_filename; + const char *default_filename = existing_filename; filename = QFileDialog::getSaveFileName(this, tr("Save File as"), default_filename, tr("Subsurface XML files (*.ssrf *.xml *.XML)")); if (filename.isNull() || filename.isEmpty()) -- cgit v1.2.3-70-g09d2