mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Match ₂ to 2 and cylinder to cyl. on CSV import
This improves the column name matching so our own columns are properly supported. See #814 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8e75243a5b
commit
14f96fc4de
1 changed files with 2 additions and 0 deletions
|
@ -419,6 +419,8 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy)
|
|||
Q_FOREACH (QString columnText, currColumns) {
|
||||
columnText.replace("\"", "");
|
||||
columnText.replace("number", "#", Qt::CaseInsensitive);
|
||||
columnText.replace("2", "₂", Qt::CaseInsensitive);
|
||||
columnText.replace("cylinder", "cyl.", Qt::CaseInsensitive);
|
||||
int idx = provider->mymatch(columnText);
|
||||
if (idx >= 0) {
|
||||
QString foundHeading = provider->data(provider->index(idx, 0), Qt::DisplayRole).toString();
|
||||
|
|
Loading…
Reference in a new issue