void LLFloaterVFSExplorer::setEditID(LLUUID edit_id) { LLScrollListCtrl* list = getChild<LLScrollListCtrl>("file_list"); bool found_in_list = (list->getItemIndex(edit_id) != -1); bool found_in_files = false; LLVFSFileSpecifier file; std::map<LLVFSFileSpecifier, LLVFSFileBlock*>::iterator end = sVFSFileMap.end(); for(std::map<LLVFSFileSpecifier, LLVFSFileBlock*>::iterator iter = sVFSFileMap.begin(); iter != end; ++iter) { if((*iter).first.mFileID == edit_id) { found_in_files = true; file = (*iter).first; break; } } if(found_in_files && found_in_list) { mEditID = edit_id; list->selectByID(edit_id); setEditEnabled(true); childSetText("name_edit", file.mFileID.asString()); childSetText("id_edit", file.mFileID.asString()); childSetValue("type_combo", std::string(LLAssetType::lookup(file.mFileType))); } else { mEditID = LLUUID::null; list->deselectAllItems(TRUE); setEditEnabled(false); childSetText("name_edit", std::string("")); childSetText("id_edit", std::string("")); childSetValue("type_combo", std::string("animatn")); } }
void LLFloaterAttachments::receiveHUDPrimRoot(LLHUDAttachment* hud_attachment) { //there will probably be a reason for this if later. or maybe not. who knows. LLHUDAttachment* child = mHUDAttachmentPrims[mRootRequests[hud_attachment->mRequestID]]; //the object requested was a root prim if(hud_attachment->mObjectID == mAvatarID) { //llinfos << hud_attachment->mName << " : " << child->mName << llendl; mHUDAttachmentHierarchy.insert(std::pair<LLUUID,LLUUID>(hud_attachment->mObjectID, mRootRequests[hud_attachment->mRequestID])); LLScrollListCtrl* list = getChild<LLScrollListCtrl>("attachment_list"); if(list->getItemIndex(child->mObjectID) == -1) { if(!mViewingChildren) addAttachmentToList(child->mObjectID, child->mName, child->mDescription); } } //the object requested was a child prim else if(mHUDAttachmentPrims.count(hud_attachment->mObjectID)) { //llinfos << hud_attachment->mName << " : " << child->mName << llendl; mHUDAttachmentHierarchy.insert(std::pair<LLUUID,LLUUID>(hud_attachment->mObjectID, mRootRequests[hud_attachment->mRequestID])); } }