From afae2af13f744da03b8cf472cb2b7d7aefff1209 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Sat, 24 Jan 2015 17:03:09 +0200 Subject: Fix the support of APD Log Viewer CSV import Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- qt-ui/divelogimportdialog.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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) { -- cgit v1.2.3-70-g09d2