Fix #208: Allow double clicking an account in the account selection dialog
This commit is contained in:
parent
28eebc09fc
commit
f9a7c1cf21
@ -44,6 +44,8 @@ AccountSelectDialog::AccountSelectDialog(const QString &message, int flags, QWid
|
|||||||
|
|
||||||
// Select the first entry in the list.
|
// Select the first entry in the list.
|
||||||
ui->listView->setCurrentIndex(ui->listView->model()->index(0, 0));
|
ui->listView->setCurrentIndex(ui->listView->model()->index(0, 0));
|
||||||
|
|
||||||
|
connect(ui->listView, SIGNAL(doubleClicked(QModelIndex)), SLOT(on_buttonBox_accepted()));
|
||||||
}
|
}
|
||||||
|
|
||||||
AccountSelectDialog::~AccountSelectDialog()
|
AccountSelectDialog::~AccountSelectDialog()
|
||||||
@ -72,8 +74,7 @@ void AccountSelectDialog::on_buttonBox_accepted()
|
|||||||
if (selection.size() > 0)
|
if (selection.size() > 0)
|
||||||
{
|
{
|
||||||
QModelIndex selected = selection.first();
|
QModelIndex selected = selection.first();
|
||||||
MojangAccountPtr account = selected.data(MojangAccountList::PointerRole).value<MojangAccountPtr>();
|
m_selected = selected.data(MojangAccountList::PointerRole).value<MojangAccountPtr>();
|
||||||
m_selected = account;
|
|
||||||
}
|
}
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user