Merge pull request #43 from lioncash/array2

AudioGroupPool: Use std::array where applicable
This commit is contained in:
2019-09-10 23:53:38 -07:00
committed by GitHub
3 changed files with 43 additions and 41 deletions

View File

@@ -239,14 +239,15 @@ CommandWidget::CommandWidget(QWidget* parent, amuse::SoundMacro::ICmd* cmd, amus
break;
}
case amuse::SoundMacro::CmdIntrospection::Field::Type::Choice: {
FieldComboBox* cb = new FieldComboBox(this);
auto* const cb = new FieldComboBox(this);
cb->setFixedHeight(30);
cb->setProperty("fieldIndex", f);
cb->setProperty("fieldName", fieldName);
for (int j = 0; j < 4; ++j) {
if (field.m_choices[j].empty())
for (const auto choice : field.m_choices) {
if (choice.empty()) {
break;
cb->addItem(tr(field.m_choices[j].data()));
}
cb->addItem(tr(choice.data()));
}
cb->setCurrentIndex(int(amuse::AccessField<int8_t>(m_cmd, field)));
connect(cb, qOverload<int>(&FieldComboBox::currentIndexChanged), this, &CommandWidget::numChanged);