[PATCH 2/2] Set the known import selection for Seabear import

Miika Turkia miika.turkia at gmail.com
Thu Jan 22 08:09:44 PST 2015


Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
---
 qt-ui/divelogimportdialog.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp
index ecb3fa0..a2b2cc3 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);
-- 
1.9.1



More information about the subsurface mailing list