summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-31 10:38:36 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-31 10:38:36 -0700
commitebdeddb9b93772574460f19bed9fe43d242d8f16 (patch)
treecaf99bc5026efc34756c7f580abf8aa0d02e261b /qt-ui
parent4cb80986fcb89392db9137938448ac9ec41a2b25 (diff)
downloadsubsurface-ebdeddb9b93772574460f19bed9fe43d242d8f16.tar.gz
When exporting to XML and no extension given, default to .ssrf
See #646 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/divelogexportdialog.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-ui/divelogexportdialog.cpp b/qt-ui/divelogexportdialog.cpp
index 22218025a..33b037d17 100644
--- a/qt-ui/divelogexportdialog.cpp
+++ b/qt-ui/divelogexportdialog.cpp
@@ -171,6 +171,8 @@ void DiveLogExportDialog::on_buttonBox_accepted()
filename = QFileDialog::getSaveFileName(this, tr("Export Subsurface XML"), lastDir,
tr("XML files (*.xml *.ssrf)"));
if (!filename.isNull() && !filename.isEmpty()) {
+ if (!filename.contains('.'))
+ filename.append(".ssrf");
QByteArray bt = QFile::encodeName(filename);
save_dives_logic(bt.data(), ui->exportSelected->isChecked());
}