diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-07-31 10:38:36 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-07-31 10:38:36 -0700 |
commit | ebdeddb9b93772574460f19bed9fe43d242d8f16 (patch) | |
tree | caf99bc5026efc34756c7f580abf8aa0d02e261b /qt-ui/divelogexportdialog.cpp | |
parent | 4cb80986fcb89392db9137938448ac9ec41a2b25 (diff) | |
download | subsurface-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/divelogexportdialog.cpp')
-rw-r--r-- | qt-ui/divelogexportdialog.cpp | 2 |
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()); } |