mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +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");
|
ui->knownImports->setCurrentText("XP5");
|
||||||
blockSignals(false);
|
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();
|
QString separator = ui->CSVSeparator->currentText() == tr("Tab") ? "\t" : ui->CSVSeparator->currentText();
|
||||||
currColumns = firstLine.split(separator);
|
currColumns = firstLine.split(separator);
|
||||||
if (triggeredBy == INITIAL) {
|
if (triggeredBy == INITIAL) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue