summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2020-01-13 19:46:10 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2020-01-13 19:46:10 +0200
commit94d718c15002b0c3e99ac14bad8379bde81d36f0 (patch)
tree5aadfeb4f56d2ef5c64c2f1f02c998213169c7d8 /indra/newview
parentc3d706be9e975a77976dc9d4656a1b50a95151a7 (diff)
SL-12556 Fixed The ‘Log In’ button being active with empty fields
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanellogin.cpp16
1 files changed, 12 insertions, 4 deletions
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<LLCredential> credential)
login_id += " ";
login_id += lastname;
}
- sInstance->getChild<LLComboBox>("username_combo")->setLabel(login_id);
+ sInstance->getChild<LLComboBox>("username_combo")->setLabel(login_id);
+ sInstance->mUsernameLength = login_id.length();
}
else if(identifier.has("type") && (std::string)identifier["type"] == "account")
{
- sInstance->getChild<LLComboBox>("username_combo")->setLabel((std::string)identifier["account_name"]);
+ std::string login_id = identifier["account_name"].asString();
+ sInstance->getChild<LLComboBox>("username_combo")->setLabel(login_id);
+ sInstance->mUsernameLength = login_id.length();
}
else
{
- sInstance->getChild<LLComboBox>("username_combo")->setLabel(std::string());
+ sInstance->getChild<LLComboBox>("username_combo")->setLabel(std::string());
+ sInstance->mUsernameLength = 0;
}
sInstance->addFavoritesToStartLocation();
@@ -641,7 +645,8 @@ void LLPanelLogin::setFields(LLPointer<LLCredential> credential)
}
else
{
- sInstance->getChild<LLUICtrl>("password_edit")->setValue(std::string());
+ sInstance->getChild<LLUICtrl>("password_edit")->setValue(std::string());
+ sInstance->mPasswordLength = 0;
}
}
@@ -1250,6 +1255,9 @@ void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential)
// selection failed, just deselect whatever might be selected
user_combo->setValue(std::string());
getChild<LLUICtrl>("password_edit")->setValue(std::string());
+ mUsernameLength = 0;
+ mPasswordLength = 0;
+ updateLoginButtons();
}
else
{