mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
CSV import: strip whitespace from column names before matching
In a user provided sample the last column name included "\r\n" which prevented us from automatically matching that column. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c41810e5a5
commit
af66ad9b6d
1 changed files with 1 additions and 1 deletions
|
@ -507,7 +507,7 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy)
|
|||
columnText.replace("2", "₂", Qt::CaseInsensitive);
|
||||
columnText.replace("cylinder", "cyl.", Qt::CaseInsensitive);
|
||||
}
|
||||
int idx = provider->mymatch(columnText);
|
||||
int idx = provider->mymatch(columnText.trimmed());
|
||||
if (idx >= 0) {
|
||||
QString foundHeading = provider->data(provider->index(idx, 0), Qt::DisplayRole).toString();
|
||||
provider->removeRow(idx);
|
||||
|
|
Loading…
Add table
Reference in a new issue