aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/divelogimportdialog.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/desktop-widgets/divelogimportdialog.cpp b/desktop-widgets/divelogimportdialog.cpp
index e4f4899eb..6473e46ed 100644
--- a/desktop-widgets/divelogimportdialog.cpp
+++ b/desktop-widgets/divelogimportdialog.cpp
@@ -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);