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>
This commit is contained in:
Miika Turkia 2015-01-24 17:03:09 +02:00 committed by Dirk Hohndel
parent b29a1bfb7b
commit afae2af13f

View file

@ -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) {