summaryrefslogtreecommitdiffstats
path: root/gui/dialogs/AccountSelectDialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/dialogs/AccountSelectDialog.cpp')
-rw-r--r--gui/dialogs/AccountSelectDialog.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/gui/dialogs/AccountSelectDialog.cpp b/gui/dialogs/AccountSelectDialog.cpp
index cdb924fb..e4cf25d3 100644
--- a/gui/dialogs/AccountSelectDialog.cpp
+++ b/gui/dialogs/AccountSelectDialog.cpp
@@ -44,6 +44,8 @@ AccountSelectDialog::AccountSelectDialog(const QString &message, int flags, QWid
// Select the first entry in the list.
ui->listView->setCurrentIndex(ui->listView->model()->index(0, 0));
+
+ connect(ui->listView, SIGNAL(doubleClicked(QModelIndex)), SLOT(on_buttonBox_accepted()));
}
AccountSelectDialog::~AccountSelectDialog()
@@ -72,8 +74,7 @@ void AccountSelectDialog::on_buttonBox_accepted()
if (selection.size() > 0)
{
QModelIndex selected = selection.first();
- MojangAccountPtr account = selected.data(MojangAccountList::PointerRole).value<MojangAccountPtr>();
- m_selected = account;
+ m_selected = selected.data(MojangAccountList::PointerRole).value<MojangAccountPtr>();
}
close();
}