summaryrefslogtreecommitdiffstats
path: root/qt-ui/divelogimportdialog.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-07 12:41:06 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-07 12:41:06 -0800
commit2f5d4720e97fea6caf7e1e937ea90e3ae4bb6dc4 (patch)
tree3134e1dc0a2405f8e76ada60de18f4b153fed252 /qt-ui/divelogimportdialog.cpp
parent810840ddb1cc72282297b1fee2f9afe6c8b3422c (diff)
downloadsubsurface-2f5d4720e97fea6caf7e1e937ea90e3ae4bb6dc4.tar.gz
CVS import UI: better message if some columns were matched
If we automatically matched the columns this might already be correct. So the standard text is confusing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelogimportdialog.cpp')
-rw-r--r--qt-ui/divelogimportdialog.cpp4
1 files changed, 4 insertions, 0 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()) {