From e06a398057f30a29ae96aabb6ec67e955dedfb27 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Thu, 11 Jul 2024 12:02:51 +0100 Subject: [PATCH] Ignore empty values for the purposes of TabularData::rowHasDuplicates --- source/shared/loading/tabulardata.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/shared/loading/tabulardata.cpp b/source/shared/loading/tabulardata.cpp index 7df94f635..a2c09c693 100644 --- a/source/shared/loading/tabulardata.cpp +++ b/source/shared/loading/tabulardata.cpp @@ -295,7 +295,12 @@ bool TabularData::rowHasDuplicates(size_t rowIndex, size_t columnIndex) const for(; columnIndex < numColumns(); columnIndex++) { - auto [it, inserted] = values.insert(valueAt(columnIndex, rowIndex)); + auto value = valueAt(columnIndex, rowIndex); + + if(value.isEmpty()) + continue; + + auto [it, inserted] = values.insert(value); if(!inserted) return true;