mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
810840ddb1
commit
2f5d4720e9
2 changed files with 5 additions and 1 deletions
|
@ -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()) {
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue