login dialog: set focus more logically if user name is empty
authorKonrad Rosenbaum <konrad@silmor.de>
Wed, 27 Nov 2013 07:22:50 +0000 (08:22 +0100)
committerKonrad Rosenbaum <konrad@silmor.de>
Wed, 27 Nov 2013 07:22:50 +0000 (08:22 +0100)
src/dialogs/login.cpp

index 528c5ce..01b7d14 100644 (file)
@@ -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()