# HG changeset patch # User Chris Cannam # Date 1536761858 -3600 # Node ID f33ee2702447d3edffa09a69d2f0a618a56e2dd3 # Parent 4616e1e891894aa08b329569d64ede1820db60dd Propose to take only value-like columns as audio samples, not all numeric ones - now that it's easy enough for the user to overrule diff -r 4616e1e89189 -r f33ee2702447 widgets/CSVAudioFormatDialog.cpp --- a/widgets/CSVAudioFormatDialog.cpp Fri Sep 07 18:12:44 2018 +0100 +++ b/widgets/CSVAudioFormatDialog.cpp Wed Sep 12 15:17:38 2018 +0100 @@ -82,7 +82,8 @@ cpc->addItem(tr("")); cpc->addItem(tr("Audio channels")); cpc->setCurrentIndex - (m_format.isColumnNumeric(i-1) ? 1 : 0); + (m_format.getColumnPurpose(i-1) == CSVFormat::ColumnValue ? + 1 : 0); exampleLayout->addWidget (new QLabel(tr("(%1 more)").arg(columns - i)), 1, i); @@ -91,11 +92,8 @@ cpc->addItem(tr("")); cpc->addItem(tr("Audio channel")); - if (m_format.isColumnNumeric(i)) { - cpc->setCurrentIndex(1); - } else { - cpc->setCurrentIndex(0); - } + cpc->setCurrentIndex + (m_format.getColumnPurpose(i) == CSVFormat::ColumnValue ? 1 : 0); for (int j = 0; j < example.size() && j < 6; ++j) { if (i >= example[j].size()) {