mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 15:55:31 +01:00
Merge pull request #8034 from spycrab/qt_npb_rclick
Qt/NetPlayBrowser: Connect to session on double-click
This commit is contained in:
commit
ac879b2475
@ -136,8 +136,10 @@ void NetPlayBrowser::ConnectWidgets()
|
|||||||
|
|
||||||
connect(m_edit_name, &QLineEdit::textChanged, this, &NetPlayBrowser::Refresh);
|
connect(m_edit_name, &QLineEdit::textChanged, this, &NetPlayBrowser::Refresh);
|
||||||
connect(m_edit_game_id, &QLineEdit::textChanged, this, &NetPlayBrowser::Refresh);
|
connect(m_edit_game_id, &QLineEdit::textChanged, this, &NetPlayBrowser::Refresh);
|
||||||
|
|
||||||
connect(m_table_widget, &QTableWidget::itemSelectionChanged, this,
|
connect(m_table_widget, &QTableWidget::itemSelectionChanged, this,
|
||||||
&NetPlayBrowser::OnSelectionChanged);
|
&NetPlayBrowser::OnSelectionChanged);
|
||||||
|
connect(m_table_widget, &QTableWidget::itemDoubleClicked, this, &NetPlayBrowser::accept);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NetPlayBrowser::Refresh()
|
void NetPlayBrowser::Refresh()
|
||||||
@ -266,6 +268,9 @@ void NetPlayBrowser::OnSelectionChanged()
|
|||||||
|
|
||||||
void NetPlayBrowser::accept()
|
void NetPlayBrowser::accept()
|
||||||
{
|
{
|
||||||
|
if (m_table_widget->selectedItems().isEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
const int index = m_table_widget->selectedItems()[0]->row();
|
const int index = m_table_widget->selectedItems()[0]->row();
|
||||||
|
|
||||||
NetPlaySession& session = m_sessions[index];
|
NetPlaySession& session = m_sessions[index];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user