comparison data/fileio/CSVFormat.cpp @ 1871:bed42ce4d3ab csv-import-headers

Include the header row in the example output after all - it's less confusing I think to have it displayed (but e.g. italicised) than to have it appear and disappear
author Chris Cannam
date Thu, 18 Jun 2020 11:55:17 +0100
parents 1b8c4ee06f6d
children
comparison
equal deleted inserted replaced
1870:1b8c4ee06f6d 1871:bed42ce4d3ab
258 258
259 if (lineno == 0 && m_headerStatus == HeaderPresent) { 259 if (lineno == 0 && m_headerStatus == HeaderPresent) {
260 // Start again with the qualities: 260 // Start again with the qualities:
261 m_columnQualities.clear(); 261 m_columnQualities.clear();
262 m_prevValues.clear(); 262 m_prevValues.clear();
263 } else if (lineno < firstLine + 10) { 263 }
264 // Not a header row, so add it to the example column output 264
265 if (lineno < firstLine + 10) {
265 m_example.push_back(list); 266 m_example.push_back(list);
266 if (lineno == firstLine || cols > m_maxExampleCols) { 267 if (lineno == 0 || cols > m_maxExampleCols) {
267 m_maxExampleCols = cols; 268 m_maxExampleCols = cols;
268 } 269 }
269 } 270 }
270 271
271 if (lineno < firstLine + 10) { 272 if (lineno < firstLine + 10) {