diff options
author | Mike Antipov <mantipov@productengine.com> | 2010-06-18 17:28:32 +0300 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2010-06-18 17:28:32 +0300 |
commit | 89825da530f0f5bb4ed2f5260c213174a34f28d8 (patch) | |
tree | c0da7b4a31a3ab7c3ed96001c204c26c6834043a /indra/newview/llappearancemgr.cpp | |
parent | 2c5af9672c8b531762475c752dd1904a4024ff67 (diff) |
EXT-7777 WIP Implemented loading indicator for "Save" and "Save As" actions in "My Outfits" & "Edit Outfit" Panels.
EXT-7929 FIXED Updated functionality of attaching object: loading indicator gets hidden when attaching is completed.
- Fixed crash when accessing singleton on application exit.
- Updated functionality of attaching object: loading indicator was not hidden.
* Reason: link to attachment was created without next appearance updating.
* Fix: passed "true" into LLAppearanceMgr::addCOFItemLink to call LLAppearanceMgr::updateAppearanceFromCOF when attachments is completed. (Like for clothing).
Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/611/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r-- | indra/newview/llappearancemgr.cpp | 19 |
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(); } |