Skip to content

Commit

Permalink
Fixed sorting in default game combobox in settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frodo45127 committed Sep 29, 2023
1 parent ac3db43 commit 8763cdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rpfm_ui/src/settings_ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ impl SettingsUI {

let extra_global_default_game_model = QStandardItemModel::new_1a(&extra_global_default_game_combobox);
extra_global_default_game_combobox.set_model(&extra_global_default_game_model);
for game in SUPPORTED_GAMES.games().iter() {
for game in SUPPORTED_GAMES.games_sorted().iter() {
extra_global_default_game_combobox.add_item_q_string(&QString::from_std_str(game.display_name()));
}

Expand Down Expand Up @@ -854,7 +854,7 @@ impl SettingsUI {
}

// Get the default game.
for (index, game) in SUPPORTED_GAMES.games().iter().enumerate() {
for (index, game) in SUPPORTED_GAMES.games_sorted().iter().enumerate() {
if game.key() == setting_string_from_q_setting(&q_settings, "default_game") {
self.extra_global_default_game_combobox.set_current_index(index as i32);
break;
Expand Down

0 comments on commit 8763cdd

Please sign in to comment.