summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/divelogimportdialog.cpp4
-rw-r--r--qt-ui/divelogimportdialog.ui2
2 files changed, 5 insertions, 1 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp
index a869a7298..e3938608e 100644
--- a/qt-ui/divelogimportdialog.cpp
+++ b/qt-ui/divelogimportdialog.cpp
@@ -352,6 +352,7 @@ void DiveLogImportDialog::loadFileContents() {
QList<QStringList> fileColumns;
QStringList currColumns;
QStringList headers;
+ bool matchedSome = false;
f.open(QFile::ReadOnly);
// guess the separator
@@ -382,10 +383,13 @@ void DiveLogImportDialog::loadFileContents() {
QString foundHeading = model->data(model->index(idx, 0), Qt::DisplayRole).toString();
model->removeRow(idx);
headers.append(foundHeading);
+ matchedSome = true;
} else {
headers.append("");
}
}
+ 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."));
f.reset();
int rows = 0;
while (rows < 10 || !f.atEnd()) {
diff --git a/qt-ui/divelogimportdialog.ui b/qt-ui/divelogimportdialog.ui
index 8565ecc05..6ee8d54f5 100644
--- a/qt-ui/divelogimportdialog.ui
+++ b/qt-ui/divelogimportdialog.ui
@@ -120,7 +120,7 @@
</widget>
</item>
<item>
- <widget class="QLabel" name="label">
+ <widget class="QLabel" name="dragInstructions">
<property name="text">
<string>Drag the tags above to each corresponding column below</string>
</property>