Qt/GameList: Fix incorrect game booting when sorted
This commit is contained in:
parent
9326cecd65
commit
99af858562
|
@ -281,11 +281,12 @@ void GameListWidget::onGameListRefreshed()
|
||||||
|
|
||||||
void GameListWidget::onTableViewItemDoubleClicked(const QModelIndex& index)
|
void GameListWidget::onTableViewItemDoubleClicked(const QModelIndex& index)
|
||||||
{
|
{
|
||||||
if (!index.isValid() || index.row() >= static_cast<int>(m_game_list->GetEntryCount()))
|
const QModelIndex source_index = m_table_sort_model->mapToSource(index);
|
||||||
|
if (!source_index.isValid() || source_index.row() >= static_cast<int>(m_game_list->GetEntryCount()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const GameList::GameListEntry& entry = m_game_list->GetEntries().at(index.row());
|
const GameList::GameListEntry& entry = m_game_list->GetEntries().at(source_index.row());
|
||||||
emit bootEntryRequested(entry);
|
emit bootEntryRequested(&entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameListWidget::resizeEvent(QResizeEvent* event)
|
void GameListWidget::resizeEvent(QResizeEvent* event)
|
||||||
|
|
Loading…
Reference in New Issue