mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 00:11:24 +12:00
Change EnhanceComboBox to optionally sort the settings list before adding it to the combo box
This commit is contained in:
parent
136fc8cfe3
commit
bad0415f05
3 changed files with 11 additions and 4 deletions
|
@ -244,7 +244,7 @@ void emu_settings::SaveSettings()
|
|||
config.close();
|
||||
}
|
||||
|
||||
void emu_settings::EnhanceComboBox(QComboBox* combobox, SettingsType type, bool is_ranged, bool use_max, int max)
|
||||
void emu_settings::EnhanceComboBox(QComboBox* combobox, SettingsType type, bool is_ranged, bool use_max, int max, bool sorted)
|
||||
{
|
||||
if (!combobox)
|
||||
{
|
||||
|
@ -265,7 +265,14 @@ void emu_settings::EnhanceComboBox(QComboBox* combobox, SettingsType type, bool
|
|||
}
|
||||
else
|
||||
{
|
||||
for (QString setting : GetSettingOptions(type))
|
||||
QStringList settings = GetSettingOptions(type);
|
||||
|
||||
if (sorted)
|
||||
{
|
||||
settings.sort();
|
||||
}
|
||||
|
||||
for (QString setting : settings)
|
||||
{
|
||||
combobox->addItem(tr(setting.toStdString().c_str()), QVariant(setting));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue