diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-11-12 10:28:41 -0500 | 
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-11-12 10:28:41 -0500 | 
| commit | c8c0c51bf6124dfd5e837acb3770239e1c0654f5 (patch) | |
| tree | de364507402e84510282b477bdf6969449d894c4 /indra | |
| parent | 95adfa4cacb68e21b7251882feffbc7cb50b4438 (diff) | |
| parent | 9245322706e6d7d00b7e91d8fd6167c58986e872 (diff) | |
Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0/
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llagentwearables.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llappearancemgr.cpp | 21 | ||||
| -rw-r--r-- | indra/newview/llappearancemgr.h | 1 | ||||
| -rw-r--r-- | indra/newview/llinventorymodel.cpp | 14 | 
4 files changed, 36 insertions, 2 deletions
| diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 9938c3db2b..13fe7b4c49 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -2023,6 +2023,8 @@ void LLInitialWearablesFetch::done()  	else  	{  		processWearablesMessage(); +		// Create links for attachments that may have arrived before the COF existed. +		LLAppearanceManager::linkRegisteredAttachments();  	}  	delete this;  } diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index d14de1c301..0901289dac 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1123,6 +1123,7 @@ void LLAppearanceManager::wearItem( LLInventoryItem* item, bool do_update )  	{  		if (do_update)  			LLAppearanceManager::updateAppearanceFromCOF(); +		return;  	}  	else  	{ @@ -1134,6 +1135,7 @@ void LLAppearanceManager::wearItem( LLInventoryItem* item, bool do_update )  							 LLAssetType::AT_LINK,  							 cb);  	} +	return;  }  /* static */ @@ -1281,3 +1283,22 @@ void LLAppearanceManager::unregisterAttachment(const LLUUID& item_id)  		   //llinfos << "no link changes, inv link not enabled" << llendl;  	   }  } + +/* static */ +void LLAppearanceManager::linkRegisteredAttachments() +{ +	for (std::set<LLUUID>::iterator it = sRegisteredAttachments.begin(); +		 it != sRegisteredAttachments.end(); +		 ++it) +	{ +		LLUUID item_id = *it; +		LLViewerInventoryItem *item = gInventory.getItem(item_id); +		if (item) +		{ +			wearItem(item, false); +			gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); +			gInventory.notifyObservers(); +		} +	} +	sRegisteredAttachments.clear(); +} diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 56f54dfc23..7dea16b6cf 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -71,6 +71,7 @@ public:  	static void unregisterAttachment(const LLUUID& item_id);  	static void registerAttachment(const LLUUID& item_id);  	static void setAttachmentInvLinkEnable(bool val); +	static void linkRegisteredAttachments();  private:  	static void filterWearableItems(LLInventoryModel::item_array_t& items, S32 max_per_type); diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index e7d7eb19d0..a25c3d0c10 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -2176,7 +2176,7 @@ bool LLInventoryModel::loadSkeleton(  			// Add all the items loaded which are parented to a  			// category with a correctly cached parent -			count = items.count(); +			S32 bad_link_count = 0;  			cat_map_t::iterator unparented = mCategoryMap.end();  			for(item_array_t::const_iterator item_iter = items.begin();  				item_iter != items.end(); @@ -2193,7 +2193,11 @@ bool LLInventoryModel::loadSkeleton(  						// This can happen if the linked object's baseobj is removed from the cache but the linked object is still in the cache.  						if (item->getIsBrokenLink())  						{ -							llinfos << "Attempted to add cached link item without baseobj present ( name: " << item->getName() << " itemID: " << item->getUUID() << " assetID: " << item->getAssetUUID() << " ).  Ignoring and invalidating " << cat->getName() << " . " << llendl; +							bad_link_count++; +							lldebugs << "Attempted to add cached link item without baseobj present ( name: " +									 << item->getName() << " itemID: " << item->getUUID() +									 << " assetID: " << item->getAssetUUID() +									 << " ).  Ignoring and invalidating " << cat->getName() << " . " << llendl;  							invalid_categories.insert(cit->second);  							continue;  						} @@ -2203,6 +2207,12 @@ bool LLInventoryModel::loadSkeleton(  					}  				}  			} +			if (bad_link_count > 0) +			{ +				llinfos << "Attempted to add " << bad_link_count +						<< " cached link items without baseobj present. " +						<< "The corresponding categories were invalidated." << llendl; +			}  		}  		else  		{ | 
