summaryrefslogtreecommitdiffstats
path: root/qt-ui/divelogimportdialog.cpp
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2015-01-22 18:09:44 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-23 06:31:47 +1200
commit5ac5619a77fb739e9e564e75c5537aaebd750a1a (patch)
treeeea96f816d83695e5a4b1c3513d3c361e37141d8 /qt-ui/divelogimportdialog.cpp
parent2e77e710a05bb6dde4cf4b29280da99a8571f66b (diff)
downloadsubsurface-5ac5619a77fb739e9e564e75c5537aaebd750a1a.tar.gz
Set the known import selection for Seabear 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.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp
index ecb3fa063..a2b2cc3a2 100644
--- a/qt-ui/divelogimportdialog.cpp
+++ b/qt-ui/divelogimportdialog.cpp
@@ -373,6 +373,9 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy)
if (firstLine.contains("SEABEAR")) {
seabear = true;
firstLine = "Sample time;Sample depth;Sample ndl;Sample tts;Sample stopdepth;Sample temperature;Sample pressure";
+ blockSignals(true);
+ ui->knownImports->setCurrentText("Seabear CSV");
+ blockSignals(false);
}
QString separator = ui->CSVSeparator->currentText() == tr("Tab") ? "\t" : ui->CSVSeparator->currentText();
currColumns = firstLine.split(separator);
@@ -411,7 +414,7 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy)
}
if (matchedSome) {
ui->dragInstructions->setText(tr("Some column headers were pre-populated; please drag and drop the headers so they match the column they are in."));
- if (triggeredBy != KNOWNTYPES) {
+ if (triggeredBy != KNOWNTYPES && !seabear) {
blockSignals(true);
ui->knownImports->setCurrentIndex(0); // <- that's "Manual import"
blockSignals(false);