configure_general: Sort data
This commit is contained in:
		| @@ -32,9 +32,11 @@ void ConfigureGeneral::SetConfiguration() { | |||||||
|     const bool runtime_lock = !system.IsPoweredOn(); |     const bool runtime_lock = !system.IsPoweredOn(); | ||||||
|     QLayout& layout = *ui->general_widget->layout(); |     QLayout& layout = *ui->general_widget->layout(); | ||||||
|  |  | ||||||
|  |     std::map<std::string, QWidget*> hold{}; | ||||||
|  |  | ||||||
|     for (const auto setting : |     for (const auto setting : | ||||||
|          UISettings::values.linkage.by_category[Settings::Category::UiGeneral]) { |          UISettings::values.linkage.by_category[Settings::Category::UiGeneral]) { | ||||||
|         ConfigurationShared::Widget* widget = |         auto* widget = | ||||||
|             new ConfigurationShared::Widget(setting, translations, this, runtime_lock, apply_funcs); |             new ConfigurationShared::Widget(setting, translations, this, runtime_lock, apply_funcs); | ||||||
|  |  | ||||||
|         if (!widget->Valid()) { |         if (!widget->Valid()) { | ||||||
| @@ -42,6 +44,10 @@ void ConfigureGeneral::SetConfiguration() { | |||||||
|             continue; |             continue; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |         hold.insert({setting->GetLabel(), widget}); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     for (const auto& [label, widget] : hold) { | ||||||
|         layout.addWidget(widget); |         layout.addWidget(widget); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user