From ebdeddb9b93772574460f19bed9fe43d242d8f16 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 31 Jul 2014 10:38:36 -0700 Subject: When exporting to XML and no extension given, default to .ssrf See #646 Signed-off-by: Dirk Hohndel --- qt-ui/divelogexportdialog.cpp | 2 ++ 1 file changed, 2 insertions(+) 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()); } -- cgit v1.2.3-70-g09d2