Merge viewer-serval

meow-7.2.2
Ansariel 2020-01-27 22:00:20 +01:00
commit 8b5a5ff2c8
4 changed files with 28 additions and 10 deletions

View File

@ -611,15 +611,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();
@ -643,7 +647,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;
}
}
@ -661,7 +666,7 @@ void LLPanelLogin::getFields(LLPointer<LLCredential>& credential,
LLSD identifier = LLSD::emptyMap();
LLSD authenticator = LLSD::emptyMap();
std::string username = sInstance->getChild<LLComboBox>("username_combo")->getValue().asString();
std::string username = sInstance->getChild<LLComboBox>("username_combo")->getSimple();
std::string password = sInstance->getChild<LLUICtrl>("password_edit")->getValue().asString();
LLStringUtil::trim(username);
@ -1229,6 +1234,8 @@ void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential)
LLComboBox* user_combo = getChild<LLComboBox>("username_combo");
user_combo->removeall();
user_combo->clear();
mUsernameLength = 0;
mPasswordLength = 0;
if (gSecAPIHandler->hasCredentialMap("login_list", LLGridManager::getInstance()->getGrid()))
{
@ -1252,6 +1259,7 @@ 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());
updateLoginButtons();
}
else
{
@ -1268,6 +1276,14 @@ void LLPanelLogin::populateUserList(LLPointer<LLCredential> credential)
user_combo->add(LLPanelLogin::getUserName(credential), credential->userID(), ADD_BOTTOM, TRUE);
setFields(credential);
}
else
{
updateLoginButtons();
}
}
else
{
updateLoginButtons();
}
}
}

View File

@ -1733,12 +1733,13 @@ void LLPanelObjectInventory::refresh()
//LL_INFOS() << "LLPanelObjectInventory::refresh()" << LL_ENDL;
BOOL has_inventory = FALSE;
const BOOL non_root_ok = TRUE;
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(NULL, non_root_ok);
if(node)
LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
LLSelectNode* node = selection->getFirstRootNode(NULL, non_root_ok);
if(node && node->mValid)
{
LLViewerObject* object = node->getObject();
if(object && ((LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() == 1)
|| (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1)))
if(object && ((selection->getRootObjectCount() == 1)
|| (selection->getObjectCount() == 1)))
{
// determine if we need to make a request. Start with a
// default based on if we have inventory at all.

View File

@ -5618,7 +5618,7 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data
}
else
{
if (node->mInventorySerial != inv_serial)
if (node->mInventorySerial != inv_serial && node->getObject())
{
node->getObject()->dirtyInventory();
}

View File

@ -3066,6 +3066,7 @@ void LLViewerObject::fetchInventoryFromServer()
if (!isInventoryPending())
{
delete mInventory;
mInventory = NULL;
// Results in processTaskInv
LLMessageSystem* msg = gMessageSystem;