Always update remember-user checkbox when user was selected

This commit is contained in:
Deve 2018-10-16 21:41:26 +02:00
parent 614d4ac2f7
commit 2dd8c0f55b

View File

@ -230,6 +230,9 @@ void BaseUserScreen::selectUser(int index)
m_password_tb->setText("");
}
getWidget<CheckBoxWidget>("remember-user")->setState(
profile->rememberPassword());
// Last game was not online, so make the offline settings the default
// (i.e. unckeck online checkbox, and make entry fields invisible).
if (!profile->wasOnlineLastTime() || profile->getLastOnlineName() == "")
@ -243,8 +246,6 @@ void BaseUserScreen::selectUser(int index)
// Now last use was with online --> Display the saved data
m_online_cb->setState(true);
makeEntryFieldsVisible();
getWidget<CheckBoxWidget>("remember-user")->setState(
profile->rememberPassword());
m_username_tb->setActive(profile->getLastOnlineName().size() == 0);
// And make the password invisible if the session is saved (i.e