diff options
author | Jan Dalheimer <jan@dalheimer.de> | 2014-08-03 23:50:26 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-11-09 02:50:30 +0100 |
commit | f9a7c1cf216a464c922ca47a60a6f44ebd7decc9 (patch) | |
tree | 913a258e4314751e3cabbc41002bbc81e4b6ac69 /gui | |
parent | 28eebc09fc127557c4895367357020978daaf428 (diff) | |
download | MultiMC-f9a7c1cf216a464c922ca47a60a6f44ebd7decc9.tar MultiMC-f9a7c1cf216a464c922ca47a60a6f44ebd7decc9.tar.gz MultiMC-f9a7c1cf216a464c922ca47a60a6f44ebd7decc9.tar.lz MultiMC-f9a7c1cf216a464c922ca47a60a6f44ebd7decc9.tar.xz MultiMC-f9a7c1cf216a464c922ca47a60a6f44ebd7decc9.zip |
Fix #208: Allow double clicking an account in the account selection dialog
Diffstat (limited to 'gui')
-rw-r--r-- | gui/dialogs/AccountSelectDialog.cpp | 5 |
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(); } |