Mercurial > hg > svgui
changeset 1322:f33ee2702447 import-audio-data
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
author | Chris Cannam |
---|---|
date | Wed, 12 Sep 2018 15:17:38 +0100 |
parents | 4616e1e89189 |
children | 8068a0bee550 |
files | widgets/CSVAudioFormatDialog.cpp |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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("<ignore>")); 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("<ignore>")); 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()) {