changeset 866:d854c72dcaa1

Handle variable columns by importing all of them (not just the minimum number)
author Chris Cannam
date Fri, 03 Oct 2014 15:27:02 +0100
parents de9472751d31
children 99373ca20caf 6c08e99ca0f3 241688360929
files widgets/CSVFormatDialog.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/widgets/CSVFormatDialog.cpp	Fri Oct 03 15:09:27 2014 +0100
+++ b/widgets/CSVFormatDialog.cpp	Fri Oct 03 15:27:02 2014 +0100
@@ -99,6 +99,9 @@
         cpc->setCurrentIndex(int(m_format.getColumnPurpose(i)));
 
         for (int j = 0; j < example.size() && j < 6; ++j) {
+            if (i >= example[j].size()) {
+                continue;
+            }
             QLabel *label = new QLabel;
             label->setTextFormat(Qt::PlainText);
             QString text = TextAbbrev::abbreviate(example[j][i], 35);