diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-11-25 13:40:48 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-11-25 13:40:48 -0500 |
commit | 2be386826f177e865133e5c7ccd4fd345f923ac9 (patch) | |
tree | 2cef59d49832f8f62e48fae059c5ef1414c1089b /indra/newview/llagentwearables.cpp | |
parent | ccf6cb3f9ba387117720d700b73ac8e05dbf1f75 (diff) | |
parent | c60165a93c4ee13dafa1c6eadbe1d19fb2cdec17 (diff) |
Automated merge with ssh://hg.lindenlab.com/tulla/avatar-pipeline-2-0
--HG--
branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llagentwearables.cpp')
-rw-r--r-- | indra/newview/llagentwearables.cpp | 42 |
1 files changed, 32 insertions, 10 deletions
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 <boost/scoped_ptr.hpp> @@ -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<LLPanelOutfitsInventory*>(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<LLInventoryCallback> 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; } |