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 | |
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>
-rw-r--r-- | qt-ui/divelogimportdialog.cpp | 4 | ||||
-rw-r--r-- | qt-ui/divelogimportdialog.ui | 2 |
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> |