From 9c823a1d40392dc00bdfb1f09220a5065d764f40 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 17 Nov 2009 10:33:47 -0500 Subject: Deferring work to idle time to avoid recursive notifyObservers calls - added wrapper class to defer an arbitrary boost::bind or other callable --HG-- branch : avatar-pipeline --- indra/newview/llappearancemgr.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'indra/newview/llappearancemgr.cpp') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 80ac9e4085..a23d21f84b 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -95,8 +95,9 @@ public: mCopyItems(copy_items), mAppend(append) {} - ~LLOutfitObserver() {} - virtual void done(); //public + ~LLOutfitObserver(); + virtual void done(); + void doWearCategory(); protected: LLUUID mCatID; @@ -104,7 +105,19 @@ protected: bool mAppend; }; +LLOutfitObserver::~LLOutfitObserver() +{ + llinfos << "~LLOutfitObserver" << llendl; +} + +// BAP is LLOutfitObserver getting deleted here? void LLOutfitObserver::done() +{ + gInventory.removeObserver(this); + doOnIdle(boost::bind(&LLOutfitObserver::doWearCategory,this)); +} + +void LLOutfitObserver::doWearCategory() { // We now have an outfit ready to be copied to agent inventory. Do // it, and wear that outfit normally. @@ -175,6 +188,7 @@ void LLOutfitObserver::done() // Wear the inventory category. LLAppearanceManager::instance().wearInventoryCategoryOnAvatar(gInventory.getCategory(mCatID), mAppend); } + delete this; } class LLOutfitFetch : public LLInventoryFetchDescendentsObserver -- cgit v1.2.3 From 32dccaf3d89b40b711d69088a3e390119c7efc7f Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Tue, 17 Nov 2009 10:36:11 -0500 Subject: Sidepanel Appearance refactoring. Work in progress. 1. Changed sidepanel names to have "sidepanel" (e.g. panel_appearance -> sidepanel_appearance) 2. Changed some "Looks" names to "Outfits" 3. Changed LLPanelLooks to LLPanelOutfitsInventory (to match other inventory panel naming) 4. Took out tab from sidepanel_appearance. --HG-- branch : avatar-pipeline --- indra/newview/llappearancemgr.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llappearancemgr.cpp') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 80ac9e4085..554f270c02 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -40,7 +40,7 @@ #include "llinventorybridge.h" #include "llinventoryobserver.h" #include "llnotifications.h" -#include "llpanelappearance.h" +#include "llsidepanelappearance.h" #include "llsidetray.h" #include "llvoavatar.h" #include "llvoavatarself.h" @@ -530,10 +530,10 @@ void LLAppearanceManager::updateCOF(const LLUUID& category, bool append) LLAssetType::AT_LINK_FOLDER, link_waiter); // Update the current outfit name of the appearance sidepanel. - LLPanelAppearance* panel_appearance = dynamic_cast(LLSideTray::getInstance()->getPanel("panel_appearance")); + LLSidepanelAppearance* panel_appearance = dynamic_cast(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); if (panel_appearance) { - panel_appearance->refreshCurrentLookName(catp->getName()); + panel_appearance->refreshCurrentOutfitName(catp->getName()); } } -- cgit v1.2.3 From 72022279535dd0ff0938e2dbbf44b6dfd6560af3 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 17 Nov 2009 13:43:12 -0500 Subject: Removed function that was only used for debugging. Defer object suicide until end of the method --HG-- branch : avatar-pipeline --- indra/newview/llappearancemgr.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'indra/newview/llappearancemgr.cpp') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index a23d21f84b..09efda6aca 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -95,7 +95,7 @@ public: mCopyItems(copy_items), mAppend(append) {} - ~LLOutfitObserver(); + ~LLOutfitObserver() {} virtual void done(); void doWearCategory(); @@ -105,12 +105,6 @@ protected: bool mAppend; }; -LLOutfitObserver::~LLOutfitObserver() -{ - llinfos << "~LLOutfitObserver" << llendl; -} - -// BAP is LLOutfitObserver getting deleted here? void LLOutfitObserver::done() { gInventory.removeObserver(this); @@ -236,7 +230,6 @@ void LLOutfitFetch::done() // loop. //dec_busy_count(); gInventory.removeObserver(this); - delete this; // increment busy count and either tell the inventory to check & // call done, or add this object to the inventory for observation. @@ -255,6 +248,7 @@ void LLOutfitFetch::done() // will call done for us when everything is here. gInventory.addObserver(outfit_observer); } + delete this; } class LLUpdateAppearanceOnDestroy: public LLInventoryCallback -- cgit v1.2.3 From 6474dbd46920fe704625a44cc2b8c56bfdca4990 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 17 Nov 2009 16:07:29 -0500 Subject: For DEV-34652: OUTFITS (Operations) : Wear folders via drag and drop - handle untyped folder dragged to outfit --HG-- branch : avatar-pipeline --- indra/newview/llappearancemgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappearancemgr.cpp') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 09efda6aca..48f11a7cf5 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -465,7 +465,7 @@ void LLAppearanceManager::filterWearableItems( // Create links to all listed items. void LLAppearanceManager::linkAll(const LLUUID& category, LLInventoryModel::item_array_t& items, - LLPointer cb) + LLPointer cb) { for (S32 i=0; i