diff options
| author | 2023-05-09 14:11:40 -0400 | |
|---|---|---|
| committer | 2023-07-21 10:56:07 -0400 | |
| commit | e2de48f14b421f810b26d83c3fabd3b46c3fcc9d (patch) | |
| tree | f0c8a1696be3ac7e8a30a38660b8fe3b21872385 /src | |
| parent | configure_general: Generate UI using containers (diff) | |
| download | yuzu-e2de48f14b421f810b26d83c3fabd3b46c3fcc9d.tar.gz yuzu-e2de48f14b421f810b26d83c3fabd3b46c3fcc9d.tar.xz yuzu-e2de48f14b421f810b26d83c3fabd3b46c3fcc9d.zip | |
configure_general: Sort data
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/configuration/configure_general.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
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() { | |||
| 32 | const bool runtime_lock = !system.IsPoweredOn(); | 32 | const bool runtime_lock = !system.IsPoweredOn(); |
| 33 | QLayout& layout = *ui->general_widget->layout(); | 33 | QLayout& layout = *ui->general_widget->layout(); |
| 34 | 34 | ||
| 35 | std::map<std::string, QWidget*> hold{}; | ||
| 36 | |||
| 35 | for (const auto setting : | 37 | for (const auto setting : |
| 36 | UISettings::values.linkage.by_category[Settings::Category::UiGeneral]) { | 38 | UISettings::values.linkage.by_category[Settings::Category::UiGeneral]) { |
| 37 | ConfigurationShared::Widget* widget = | 39 | auto* widget = |
| 38 | new ConfigurationShared::Widget(setting, translations, this, runtime_lock, apply_funcs); | 40 | new ConfigurationShared::Widget(setting, translations, this, runtime_lock, apply_funcs); |
| 39 | 41 | ||
| 40 | if (!widget->Valid()) { | 42 | if (!widget->Valid()) { |
| @@ -42,6 +44,10 @@ void ConfigureGeneral::SetConfiguration() { | |||
| 42 | continue; | 44 | continue; |
| 43 | } | 45 | } |
| 44 | 46 | ||
| 47 | hold.insert({setting->GetLabel(), widget}); | ||
| 48 | } | ||
| 49 | |||
| 50 | for (const auto& [label, widget] : hold) { | ||
| 45 | layout.addWidget(widget); | 51 | layout.addWidget(widget); |
| 46 | } | 52 | } |
| 47 | } | 53 | } |