aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-14 06:13:03 +0900
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-14 06:13:03 +0900
commited6a42f6f2e4309edda0c7c02d8df229a32c9315 (patch)
treeedda1eb12bb457f613393bc201ad7e98ef052f80 /qt-ui
parentc86d055db77cdeef6049449ac79fe404c40d28cc (diff)
downloadsubsurface-ed6a42f6f2e4309edda0c7c02d8df229a32c9315.tar.gz
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 <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/mainwindow.cpp7
1 files changed, 1 insertions, 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())