From e2507e0b4cbb8de055d9c082da9cb574bb05a162 Mon Sep 17 00:00:00 2001 From: Konrad Rosenbaum Date: Wed, 27 Nov 2013 08:22:50 +0100 Subject: [PATCH] login dialog: set focus more logically if user name is empty --- src/dialogs/login.cpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/dialogs/login.cpp b/src/dialogs/login.cpp index 528c5ce..01b7d14 100644 --- a/src/dialogs/login.cpp +++ b/src/dialogs/login.cpp @@ -102,7 +102,10 @@ void MLogin::loadProfile() username->setText(set.value("username").toString()); username->setPlaceholderText(set.value("usernamehint").toString()); password->setText(""); - password->setFocus(); + if(username->text().isEmpty()) + username->setFocus(); + else + password->setFocus(); } void MLogin::startLogin() -- 1.7.2.5