mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 21:35:46 +00:00
configuration: Use IDs to sort holds
This commit is contained in:
parent
f7948b7b64
commit
9e3c94bb3d
4 changed files with 16 additions and 27 deletions
|
@ -37,7 +37,7 @@ void ConfigureGeneral::SetConfiguration() {
|
|||
const bool runtime_lock = !system.IsPoweredOn();
|
||||
QLayout& layout = *ui->general_widget->layout();
|
||||
|
||||
std::map<std::string, QWidget*> hold{};
|
||||
std::map<u32, QWidget*> hold{};
|
||||
|
||||
for (const auto setting :
|
||||
UISettings::values.linkage.by_category[Settings::Category::UiGeneral]) {
|
||||
|
@ -49,10 +49,10 @@ void ConfigureGeneral::SetConfiguration() {
|
|||
continue;
|
||||
}
|
||||
|
||||
hold.insert({setting->GetLabel(), widget});
|
||||
hold.emplace(setting->Id(), widget);
|
||||
}
|
||||
|
||||
for (const auto& [label, widget] : hold) {
|
||||
for (const auto& [id, widget] : hold) {
|
||||
layout.addWidget(widget);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue