diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index ccb47f8221..d717b3dea4 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -611,15 +611,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(); @@ -643,7 +647,8 @@ void LLPanelLogin::setFields(LLPointer credential) } else { - sInstance->getChild("password_edit")->setValue(std::string()); + sInstance->getChild("password_edit")->setValue(std::string()); + sInstance->mPasswordLength = 0; } } @@ -661,7 +666,7 @@ void LLPanelLogin::getFields(LLPointer& credential, LLSD identifier = LLSD::emptyMap(); LLSD authenticator = LLSD::emptyMap(); - std::string username = sInstance->getChild("username_combo")->getValue().asString(); + std::string username = sInstance->getChild("username_combo")->getSimple(); std::string password = sInstance->getChild("password_edit")->getValue().asString(); LLStringUtil::trim(username); @@ -1229,6 +1234,8 @@ void LLPanelLogin::populateUserList(LLPointer credential) LLComboBox* user_combo = getChild("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 credential) // selection failed, just deselect whatever might be selected user_combo->setValue(std::string()); getChild("password_edit")->setValue(std::string()); + updateLoginButtons(); } else { @@ -1268,6 +1276,14 @@ void LLPanelLogin::populateUserList(LLPointer credential) user_combo->add(LLPanelLogin::getUserName(credential), credential->userID(), ADD_BOTTOM, TRUE); setFields(credential); } + else + { + updateLoginButtons(); + } + } + else + { + updateLoginButtons(); } } } diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 0df8b32aeb..9c7ae73454 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -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. diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 11f317c1b3..9ec36f43e4 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -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(); } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index dc78a622c0..e3d3f23a20 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -3066,6 +3066,7 @@ void LLViewerObject::fetchInventoryFromServer() if (!isInventoryPending()) { delete mInventory; + mInventory = NULL; // Results in processTaskInv LLMessageSystem* msg = gMessageSystem;