From 94d718c15002b0c3e99ac14bad8379bde81d36f0 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 13 Jan 2020 19:46:10 +0200 Subject: =?UTF-8?q?SL-12556=20Fixed=20The=20=E2=80=98Log=20In=E2=80=99=20b?= =?UTF-8?q?utton=20being=20active=20with=20empty=20fields?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- indra/newview/llpanellogin.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 4edcf4a47d..dd4ca261ff 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -609,15 +609,19 @@ void LLPanelLogin::setFields(LLPointer credential) login_id += " "; login_id += lastname; } - sInstance->getChild("username_combo")->setLabel(login_id); + sInstance->getChild("username_combo")->setLabel(login_id); + sInstance->mUsernameLength = login_id.length(); } else if(identifier.has("type") && (std::string)identifier["type"] == "account") { - sInstance->getChild("username_combo")->setLabel((std::string)identifier["account_name"]); + std::string login_id = identifier["account_name"].asString(); + sInstance->getChild("username_combo")->setLabel(login_id); + sInstance->mUsernameLength = login_id.length(); } else { - sInstance->getChild("username_combo")->setLabel(std::string()); + sInstance->getChild("username_combo")->setLabel(std::string()); + sInstance->mUsernameLength = 0; } sInstance->addFavoritesToStartLocation(); @@ -641,7 +645,8 @@ void LLPanelLogin::setFields(LLPointer credential) } else { - sInstance->getChild("password_edit")->setValue(std::string()); + sInstance->getChild("password_edit")->setValue(std::string()); + sInstance->mPasswordLength = 0; } } @@ -1250,6 +1255,9 @@ void LLPanelLogin::populateUserList(LLPointer credential) // selection failed, just deselect whatever might be selected user_combo->setValue(std::string()); getChild("password_edit")->setValue(std::string()); + mUsernameLength = 0; + mPasswordLength = 0; + updateLoginButtons(); } else { -- cgit v1.2.3