summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
authorRick Pasetto <rick@lindenlab.com>2009-11-12 09:23:57 -0800
committerRick Pasetto <rick@lindenlab.com>2009-11-12 09:23:57 -0800
commit3dd79ad226bc8e0aec18dba87223a3f50ecf360b (patch)
tree2af4f4e5d50d35065dda3101b60b40a3c1c21aee /indra/newview/llappearancemgr.cpp
parent72af8dc3f0a249f69869bc6f52dd7a887702a964 (diff)
parent7a45dec2d540581ef080386e4a967befd22b6adb (diff)
merge
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r--indra/newview/llappearancemgr.cpp33
1 files changed, 27 insertions, 6 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 41cd77b45d..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 */
@@ -1243,14 +1245,14 @@ void dumpAttachmentSet(const std::set<LLUUID>& atts, const std::string& msg)
void LLAppearanceManager::registerAttachment(const LLUUID& item_id)
{
sRegisteredAttachments.insert(item_id);
- dumpAttachmentSet(sRegisteredAttachments,"after register:");
+ //dumpAttachmentSet(sRegisteredAttachments,"after register:");
if (sAttachmentInvLinkEnabled)
{
LLViewerInventoryItem *item = gInventory.getItem(item_id);
if (item)
{
- LLAppearanceManager::dumpCat(LLAppearanceManager::getCOF(),"Adding attachment link:");
+ //LLAppearanceManager::dumpCat(LLAppearanceManager::getCOF(),"Adding attachment link:");
LLAppearanceManager::wearItem(item,false); // Add COF link for item.
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
gInventory.notifyObservers();
@@ -1258,7 +1260,7 @@ void LLAppearanceManager::registerAttachment(const LLUUID& item_id)
}
else
{
- llinfos << "no link changes, inv link not enabled" << llendl;
+ //llinfos << "no link changes, inv link not enabled" << llendl;
}
}
@@ -1266,11 +1268,11 @@ void LLAppearanceManager::registerAttachment(const LLUUID& item_id)
void LLAppearanceManager::unregisterAttachment(const LLUUID& item_id)
{
sRegisteredAttachments.erase(item_id);
- dumpAttachmentSet(sRegisteredAttachments,"after unregister:");
+ //dumpAttachmentSet(sRegisteredAttachments,"after unregister:");
if (sAttachmentInvLinkEnabled)
{
- LLAppearanceManager::dumpCat(LLAppearanceManager::getCOF(),"Removing attachment link:");
+ //LLAppearanceManager::dumpCat(LLAppearanceManager::getCOF(),"Removing attachment link:");
LLAppearanceManager::removeItemLinks(item_id, false);
// BAP - needs to change for label to track link.
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
@@ -1278,6 +1280,25 @@ void LLAppearanceManager::unregisterAttachment(const LLUUID& item_id)
}
else
{
- llinfos << "no link changes, inv link not enabled" << llendl;
+ //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();
+}