summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r--indra/newview/llappearancemgr.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 4e96372da9..405cc5b282 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -177,7 +177,13 @@ class LLUpdateDirtyState: public LLInventoryCallback
{
public:
LLUpdateDirtyState() {}
- virtual ~LLUpdateDirtyState(){ LLAppearanceMgr::getInstance()->updateIsDirty(); }
+ virtual ~LLUpdateDirtyState()
+ {
+ if (LLAppearanceMgr::instanceExists())
+ {
+ LLAppearanceMgr::getInstance()->updateIsDirty();
+ }
+ }
virtual void fire(const LLUUID&) {}
};
@@ -2150,6 +2156,8 @@ bool LLAppearanceMgr::updateBaseOutfit()
}
setOutfitLocked(true);
+ gAgentWearables.notifyLoadingStarted();
+
const LLUUID base_outfit_id = getBaseOutfitUUID();
if (base_outfit_id.isNull()) return false;
@@ -2309,6 +2317,7 @@ public:
}
LLAppearanceMgr::getInstance()->updateIsDirty();
+ gAgentWearables.notifyLoadingFinished(); // New outfit is saved.
LLAppearanceMgr::getInstance()->updatePanelOutfitName("");
}
@@ -2324,6 +2333,8 @@ LLUUID LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name, b
{
if (!isAgentAvatarValid()) return LLUUID::null;
+ gAgentWearables.notifyLoadingStarted();
+
// First, make a folder in the My Outfits directory.
const LLUUID parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
LLUUID folder_id = gInventory.createNewCategory(
@@ -2530,7 +2541,9 @@ void LLAppearanceMgr::registerAttachment(const LLUUID& item_id)
if (mAttachmentInvLinkEnabled)
{
- LLAppearanceMgr::addCOFItemLink(item_id, false); // Add COF link for item.
+ // we have to pass do_update = true to call LLAppearanceMgr::updateAppearanceFromCOF.
+ // it will trigger gAgentWariables.notifyLoadingFinished()
+ LLAppearanceMgr::addCOFItemLink(item_id, true); // Add COF link for item.
}
else
{
@@ -2560,7 +2573,7 @@ void LLAppearanceMgr::linkRegisteredAttachments()
++it)
{
LLUUID item_id = *it;
- addCOFItemLink(item_id, false);
+ addCOFItemLink(item_id, true);
}
mRegisteredAttachments.clear();
}