summaryrefslogtreecommitdiffstats
path: root/qt-ui/divelogimportdialog.cpp
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2015-01-24 17:03:09 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-24 14:49:04 -0800
commitafae2af13f744da03b8cf472cb2b7d7aefff1209 (patch)
tree6d251203905830e3666c570114cd3255c1b0d62f /qt-ui/divelogimportdialog.cpp
parentb29a1bfb7b3b82d12cc37d9c14d675c6eac84868 (diff)
downloadsubsurface-afae2af13f744da03b8cf472cb2b7d7aefff1209.tar.gz
Fix the support of APD Log Viewer CSV import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelogimportdialog.cpp')
-rw-r--r--qt-ui/divelogimportdialog.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp
index fe8e0a505..838ea8974 100644
--- a/qt-ui/divelogimportdialog.cpp
+++ b/qt-ui/divelogimportdialog.cpp
@@ -385,6 +385,15 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy)
ui->knownImports->setCurrentText("XP5");
blockSignals(false);
}
+
+ // Special handling for APD Log Viewer
+ if (triggeredBy == KNOWNTYPES && value == 1) {
+ firstLine = "Sample time\tSample depth\t\t\t\t\tSample po2\t\t\t\t\t\t\t\t\tSample temperature\t\tSample cns\tSample stopdetph";
+ blockSignals(true);
+ ui->CSVSeparator->setCurrentText(tr("Tab"));
+ blockSignals(false);
+ }
+
QString separator = ui->CSVSeparator->currentText() == tr("Tab") ? "\t" : ui->CSVSeparator->currentText();
currColumns = firstLine.split(separator);
if (triggeredBy == INITIAL) {