From c60165a93c4ee13dafa1c6eadbe1d19fb2cdec17 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 25 Nov 2009 13:39:45 -0500 Subject: For EXT-2584: Select and rename new folder when creating new outfit --HG-- branch : avatar-pipeline --- indra/newview/llagentwearables.cpp | 42 +++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 10 deletions(-) (limited to 'indra/newview/llagentwearables.cpp') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 475f34dc2b..f0742876e2 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -49,6 +49,9 @@ #include "llgesturemgr.h" #include "llappearancemgr.h" #include "lltexlayer.h" +#include "llsidetray.h" +#include "llpaneloutfitsinventory.h" +#include "llfolderview.h" #include @@ -1295,6 +1298,33 @@ void LLAgentWearables::makeNewOutfit(const std::string& new_folder_name, } } +class LLAutoRenameFolder: public LLInventoryCallback +{ +public: + LLAutoRenameFolder(LLUUID& folder_id): + mFolderID(folder_id) + { + } + + virtual ~LLAutoRenameFolder() + { + LLSD key; + LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key); + LLPanelOutfitsInventory *outfit_panel = + dynamic_cast(LLSideTray::getInstance()->getPanel("panel_outfits_inventory")); + outfit_panel->getRootFolder()->clearSelection(); + outfit_panel->getRootFolder()->setSelectionByID(mFolderID, TRUE); + outfit_panel->getRootFolder()->setNeedsAutoRename(TRUE); + } + + virtual void fire(const LLUUID&) + { + } + +private: + LLUUID mFolderID; +}; + LLUUID LLAgentWearables::makeNewOutfitLinks(const std::string& new_folder_name) { if (mAvatarObject.isNull()) @@ -1309,17 +1339,9 @@ LLUUID LLAgentWearables::makeNewOutfitLinks(const std::string& new_folder_name) LLFolderType::FT_OUTFIT, new_folder_name); - LLAppearanceManager::instance().shallowCopyCategory(LLAppearanceManager::instance().getCOF(),folder_id, NULL); + LLPointer cb = new LLAutoRenameFolder(folder_id); + LLAppearanceManager::instance().shallowCopyCategory(LLAppearanceManager::instance().getCOF(),folder_id, cb); -#if 0 // BAP - fix to go into rename state automatically after outfit is created. - LLViewerInventoryCategory *parent_category = gInventory.getCategory(parent_id); - if (parent_category) - { - parent_category->setSelectionByID(folder_id,TRUE); - parent_category->setNeedsAutoRename(TRUE); - } -#endif - return folder_id; } -- cgit v1.2.3 From 43d52671c8c71af188456c200baba7c3bc8d4799 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Wed, 25 Nov 2009 13:59:23 -0500 Subject: EXT-2769 hair alpha not applied immediately Apparently none of the texture pickers were invalidating the baked textures causing selected textures to not appear on the avatar until you actually saved the wearable. This patch forces the composites to update when you change any texture or color (or invisibility flag). Code reviewed by Seraph --HG-- branch : avatar-pipeline --- indra/newview/llagentwearables.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llagentwearables.cpp') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 475f34dc2b..e2d0daa245 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -408,7 +408,7 @@ void LLAgentWearables::saveWearable(const EWearableType type, const U32 index, B return; } - gAgent.getAvatarObject()->wearableUpdated( type ); + gAgent.getAvatarObject()->wearableUpdated( type, TRUE ); if (send_update) { @@ -698,7 +698,7 @@ U32 LLAgentWearables::pushWearable(const EWearableType type, LLWearable *wearabl void LLAgentWearables::wearableUpdated(LLWearable *wearable) { - mAvatarObject->wearableUpdated(wearable->getType()); + mAvatarObject->wearableUpdated(wearable->getType(), TRUE); wearable->setLabelUpdated(); // Hack pt 2. If the wearable we just loaded has definition version 24, @@ -739,7 +739,7 @@ void LLAgentWearables::popWearable(const EWearableType type, U32 index) if (wearable) { mWearableDatas[type].erase(mWearableDatas[type].begin() + index); - mAvatarObject->wearableUpdated(wearable->getType()); + mAvatarObject->wearableUpdated(wearable->getType(), TRUE); wearable->setLabelUpdated(); } } -- cgit v1.2.3 From 4899fea00652d37b35cbc32ad6f2ca05a5cffd6b Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 30 Nov 2009 11:58:28 -0500 Subject: For EXT-2857: Open 'Outfits Bar' accordion when creating/renaming new outfit --HG-- branch : avatar-pipeline --- indra/newview/llagentwearables.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'indra/newview/llagentwearables.cpp') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index f0742876e2..5d56a5dfa1 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -52,6 +52,7 @@ #include "llsidetray.h" #include "llpaneloutfitsinventory.h" #include "llfolderview.h" +#include "llaccordionctrltab.h" #include @@ -1312,9 +1313,17 @@ public: LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key); LLPanelOutfitsInventory *outfit_panel = dynamic_cast(LLSideTray::getInstance()->getPanel("panel_outfits_inventory")); - outfit_panel->getRootFolder()->clearSelection(); - outfit_panel->getRootFolder()->setSelectionByID(mFolderID, TRUE); - outfit_panel->getRootFolder()->setNeedsAutoRename(TRUE); + if (outfit_panel) + { + outfit_panel->getRootFolder()->clearSelection(); + outfit_panel->getRootFolder()->setSelectionByID(mFolderID, TRUE); + outfit_panel->getRootFolder()->setNeedsAutoRename(TRUE); + } + LLAccordionCtrlTab* tab_outfits = outfit_panel ? outfit_panel->findChild("tab_outfits") : 0; + if (tab_outfits && !tab_outfits->getDisplayChildren()) + { + tab_outfits->changeOpenClose(tab_outfits->getDisplayChildren()); + } } virtual void fire(const LLUUID&) -- cgit v1.2.3