From b3f4c6fb7ad79501fa91e14cc93ef3dcd1cce8ae Mon Sep 17 00:00:00 2001 From: "Eric M. Tulla (BigPapi)" Date: Thu, 4 Feb 2010 15:52:07 -0500 Subject: EXT-4841 - Expand one of the outfits in the outfits tab for new users so they can get a sense of their contents. Also moved the My Outfits autopopulation from the library out of where it was done before (as a result of initial wearables message) to be done in the idle login during the precaching state. -Reviewed by Nyx --- indra/newview/llpaneloutfitsinventory.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'indra/newview/llpaneloutfitsinventory.cpp') diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index cf903958ee..c2f2d32142 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -159,6 +159,27 @@ void LLPanelOutfitsInventory::onOpen(const LLSD& key) // Make sure we know which tab is selected, update the filter, // and update verbs. onTabChange(); + + // Auto open the first outfit newly created so new users can see sample outfit contents + static bool should_open_outfit = true; + if (should_open_outfit && gAgent.isFirstLogin()) + { + LLInventoryPanel* outfits_panel = getChild(OUTFITS_TAB_NAME); + if (outfits_panel) + { + LLUUID my_outfits_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); + LLFolderViewFolder* my_outfits_folder = outfits_panel->getRootFolder()->getFolderByID(my_outfits_id); + if (my_outfits_folder) + { + LLFolderViewFolder* first_outfit = dynamic_cast(my_outfits_folder->getFirstChild()); + if (first_outfit) + { + first_outfit->setOpen(TRUE); + } + } + } + } + should_open_outfit = false; } void LLPanelOutfitsInventory::updateVerbs() -- cgit v1.2.3