mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 23:33:24 +00:00
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:
parent
b29a1bfb7b
commit
afae2af13f
1 changed files with 9 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue