mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-03-18 03:05:22 +01:00
Qt: Fix game list selection after Refresh(true)
This commit is contained in:
parent
bc0c42b025
commit
43f3a4816d
|
|
@ -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_info>& game_data, const QColor& icon_color, const QSize& icon_size, qreal device_pixel_ratio)
|
||||
|
|
|
|||
Loading…
Reference in a new issue