From 43f3a4816d7f997c39942f0beb9999a2a4b0a307 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Tue, 17 Mar 2026 18:03:53 +0100 Subject: [PATCH] Qt: Fix game list selection after Refresh(true) --- rpcs3/rpcs3qt/game_list_table.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/rpcs3/rpcs3qt/game_list_table.cpp b/rpcs3/rpcs3qt/game_list_table.cpp index 737709dabb..5a5e183cd1 100644 --- a/rpcs3/rpcs3qt/game_list_table.cpp +++ b/rpcs3/rpcs3qt/game_list_table.cpp @@ -412,10 +412,21 @@ void game_list_table::populate( row++; } + bool first_index = true; + for (int selected_row : selected_rows) { - selectionModel()->select(model()->index(selected_row, 0), QItemSelectionModel::Select | QItemSelectionModel::Rows); + const QModelIndex index = model()->index(selected_row, 0); + + selectionModel()->select(index, QItemSelectionModel::Select | QItemSelectionModel::Rows); + + if (first_index) + { + selectionModel()->setCurrentIndex(index, QItemSelectionModel::NoUpdate); + first_index = false; + } } + Q_EMIT itemSelectionChanged(); } void game_list_table::repaint_icons(std::vector& game_data, const QColor& icon_color, const QSize& icon_size, qreal device_pixel_ratio)