From 674b6f237307286c2b2872eba1faceb237f5e8c9 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 20 Oct 2015 13:56:35 +0200 Subject: [PATCH] Account Settings: clear the focus of the "Sign In" button when clicked So that the focus does not go to the "Remove Account" button instead which would be wierd --- src/gui/accountsettings.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp index 2df2060cf..86d25467b 100644 --- a/src/gui/accountsettings.cpp +++ b/src/gui/accountsettings.cpp @@ -476,6 +476,11 @@ void AccountSettings::slotAccountStateChanged(int state) serverWithUser = tr("%1 as %2").arg(server, cred->user()); } + if (state != AccountState::SignedOut && ui->signInButton->hasFocus()) { + // The button is about to be hidden, clear the focus so the focus don't go to the + // "remove account" button + ui->signInButton->clearFocus(); + } ui->signInButton->setVisible(state == AccountState::SignedOut); if (state == AccountState::Connected) { showConnectionLabel( tr("Connected to %1.").arg(serverWithUser) ); -- 2.30.2