diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-01-07 12:41:06 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-07 12:41:06 -0800 |
commit | 2f5d4720e97fea6caf7e1e937ea90e3ae4bb6dc4 (patch) | |
tree | 3134e1dc0a2405f8e76ada60de18f4b153fed252 /qt-ui/divelogimportdialog.cpp | |
parent | 810840ddb1cc72282297b1fee2f9afe6c8b3422c (diff) | |
download | subsurface-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.cpp | 4 |
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()) { |