|
|
@ -124,12 +124,18 @@ void Widget::CreateCombobox(const QString& label, std::function<void()>& load_fu |
|
|
layout->setSpacing(6); |
|
|
layout->setSpacing(6); |
|
|
layout->setContentsMargins(0, 0, 0, 0); |
|
|
layout->setContentsMargins(0, 0, 0, 0); |
|
|
|
|
|
|
|
|
combobox->setCurrentIndex(std::stoi(setting.ToString())); |
|
|
|
|
|
|
|
|
|
|
|
if (!managed) { |
|
|
if (!managed) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// TODO: Remove audio engine specialization
|
|
|
|
|
|
if (setting.TypeId() != typeid(Settings::AudioEngine)) { |
|
|
|
|
|
combobox->setCurrentIndex(std::stoi(setting.ToString())); |
|
|
|
|
|
} else { |
|
|
|
|
|
combobox->setCurrentIndex( |
|
|
|
|
|
static_cast<u32>(Settings::ToEnum<Settings::AudioEngine>(setting.ToString()))); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (Settings::IsConfiguringGlobal()) { |
|
|
if (Settings::IsConfiguringGlobal()) { |
|
|
load_func = [=]() { setting.LoadString(std::to_string(combobox->currentIndex())); }; |
|
|
load_func = [=]() { setting.LoadString(std::to_string(combobox->currentIndex())); }; |
|
|
} else { |
|
|
} else { |
|
|
|