From e2de48f14b421f810b26d83c3fabd3b46c3fcc9d Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Tue, 9 May 2023 14:11:40 -0400 Subject: [PATCH] configure_general: Sort data --- src/yuzu/configuration/configure_general.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/yuzu/configuration/configure_general.cpp b/src/yuzu/configuration/configure_general.cpp index 743ea824c..a7f26023d 100644 --- a/src/yuzu/configuration/configure_general.cpp +++ b/src/yuzu/configuration/configure_general.cpp @@ -32,9 +32,11 @@ void ConfigureGeneral::SetConfiguration() { const bool runtime_lock = !system.IsPoweredOn(); QLayout& layout = *ui->general_widget->layout(); + std::map hold{}; + for (const auto setting : UISettings::values.linkage.by_category[Settings::Category::UiGeneral]) { - ConfigurationShared::Widget* widget = + auto* widget = new ConfigurationShared::Widget(setting, translations, this, runtime_lock, apply_funcs); if (!widget->Valid()) { @@ -42,6 +44,10 @@ void ConfigureGeneral::SetConfiguration() { continue; } + hold.insert({setting->GetLabel(), widget}); + } + + for (const auto& [label, widget] : hold) { layout.addWidget(widget); } }