diff options
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r-- | indra/newview/llappearancemgr.cpp | 29 |
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; |