Fix crash on manually added ZXU/DL7 file
The CSV import crashed if the input file had no samples in it. Fixes #566 Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
parent
40cc0b0e4b
commit
f3ab2ee674
@ -737,7 +737,9 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy)
|
||||
fileColumns.append(currColumns);
|
||||
rows += 1;
|
||||
}
|
||||
resultModel->setColumnValues(fileColumns);
|
||||
|
||||
if (rows > 0)
|
||||
resultModel->setColumnValues(fileColumns);
|
||||
for (int i = 0; i < headers.count(); i++)
|
||||
if (!headers.at(i).isEmpty())
|
||||
resultModel->setData(resultModel->index(0, i),headers.at(i),Qt::EditRole);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user