CSV import: improve header parsing

The skipping of header field manipulation for APD was a bit too
aggressive, skipping the header fix up for all logs when on initial
state. Also, addition of APD2 was not taken into account.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2015-09-06 13:06:15 +03:00 committed by Dirk Hohndel
parent e8df3da9e3
commit 4a72ac2d2b

View file

@ -501,7 +501,7 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy)
* also know that the column headers do not need this
* conversion.
*/
if (triggeredBy == KNOWNTYPES && value != APD) {
if (apd == false) {
columnText.replace("\"", "");
columnText.replace("number", "#", Qt::CaseInsensitive);
columnText.replace("2", "", Qt::CaseInsensitive);