summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2009-12-07 15:02:31 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2009-12-07 15:02:31 -0500
commit98c74f4eb86b8970159f445e040fb38d0fbf55fd (patch)
tree0c67919a977c5c4fdabe1ad8e8c6ebdd86ba3152 /indra/newview/llappearancemgr.cpp
parent23068a2e7d9086a212d8c1eb4318c762705ab31e (diff)
For EXT-2637: Renaming outfit that's currently worn should update Current Outfit string
--HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r--indra/newview/llappearancemgr.cpp29
1 files changed, 16 insertions, 13 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index d91b9d7ea4..c06098689d 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -574,29 +574,32 @@ void LLAppearanceManager::updateCOF(const LLUUID& category, bool append)
linkAll(cof, obj_items, link_waiter);
linkAll(cof, gest_items, link_waiter);
- LLSidepanelAppearance* panel_appearance = dynamic_cast<LLSidepanelAppearance *>(LLSideTray::getInstance()->getPanel("sidepanel_appearance"));
// Add link to outfit if category is an outfit.
LLViewerInventoryCategory* catp = gInventory.getCategory(category);
- if (!append && catp && catp->getPreferredType() == LLFolderType::FT_OUTFIT)
+ if (!append)
{
- link_inventory_item(gAgent.getID(), category, cof, catp->getName(),
- LLAssetType::AT_LINK_FOLDER, link_waiter);
-
- // Update the current outfit name of the appearance sidepanel.
- if (panel_appearance)
+ std::string new_outfit_name = "";
+ if (catp && catp->getPreferredType() == LLFolderType::FT_OUTFIT)
{
- panel_appearance->refreshCurrentOutfitName(catp->getName());
+ link_inventory_item(gAgent.getID(), category, cof, catp->getName(),
+ LLAssetType::AT_LINK_FOLDER, link_waiter);
+ new_outfit_name = catp->getName();
}
+ updatePanelOutfitName(new_outfit_name);
}
- else
+}
+
+void LLAppearanceManager::updatePanelOutfitName(const std::string& name)
+{
+ LLSidepanelAppearance* panel_appearance =
+ dynamic_cast<LLSidepanelAppearance *>(LLSideTray::getInstance()->getPanel("sidepanel_appearance"));
+ if (panel_appearance)
{
- if (panel_appearance)
- {
- panel_appearance->refreshCurrentOutfitName("");
- }
+ panel_appearance->refreshCurrentOutfitName(name);
}
}
+
void LLAppearanceManager::updateAgentWearables(LLWearableHoldingPattern* holder, bool append)
{
lldebugs << "updateAgentWearables()" << llendl;