diff options
author | Richard Linden <none@none> | 2010-07-27 14:34:17 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2010-07-27 14:34:17 -0700 |
commit | 6cd862063d8e9ce68efd0e15aeb3da76160fcd81 (patch) | |
tree | 3f98c889d39e5fcf303bf08615a51d400ec64cde /indra/newview/llcofwearables.cpp | |
parent | fe8a5a007ab82f3d6a763c5cb133e1299d238632 (diff) | |
parent | 15247f086989a43881d79c1ee5416bb00721eb68 (diff) |
merge
Diffstat (limited to 'indra/newview/llcofwearables.cpp')
-rw-r--r-- | indra/newview/llcofwearables.cpp | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index 4c0f51056d..86d9121213 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -283,7 +283,8 @@ LLCOFWearables::LLCOFWearables() : LLPanel(), mClothingTab(NULL), mAttachmentsTab(NULL), mBodyPartsTab(NULL), - mLastSelectedTab(NULL) + mLastSelectedTab(NULL), + mCOFVersion(-1) { mClothingMenu = new CofClothingContextMenu(this); mAttachmentMenu = new CofAttachmentContextMenu(this); @@ -378,6 +379,23 @@ void LLCOFWearables::onAccordionTabStateChanged(LLUICtrl* ctrl, const LLSD& expa void LLCOFWearables::refresh() { + const LLUUID cof_id = LLAppearanceMgr::instance().getCOF(); + if (cof_id.isNull()) + { + llwarns << "COF ID cannot be NULL" << llendl; + return; + } + + LLViewerInventoryCategory* catp = gInventory.getCategory(cof_id); + if (!catp) + { + llwarns << "COF category cannot be NULL" << llendl; + return; + } + + if (mCOFVersion == catp->getVersion()) return; + mCOFVersion = catp->getVersion(); + typedef std::vector<LLSD> values_vector_t; typedef std::map<LLFlatListView*, values_vector_t> selection_map_t; @@ -393,7 +411,7 @@ void LLCOFWearables::refresh() LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t cof_items; - gInventory.collectDescendents(LLAppearanceMgr::getInstance()->getCOF(), cats, cof_items, LLInventoryModel::EXCLUDE_TRASH); + gInventory.collectDescendents(cof_id, cats, cof_items, LLInventoryModel::EXCLUDE_TRASH); populateAttachmentsAndBodypartsLists(cof_items); @@ -501,7 +519,7 @@ LLPanelClothingListItem* LLCOFWearables::buildClothingListItem(LLViewerInventory item_panel->childSetAction("btn_edit", mCOFCallbacks.mEditWearable); //turning on gray separator line for the last item in the items group of the same wearable type - item_panel->childSetVisible("wearable_type_separator_icon", last); + item_panel->setSeparatorVisible(last); return item_panel; } @@ -637,10 +655,10 @@ LLAssetType::EType LLCOFWearables::getExpandedAccordionAssetType() const LLAccordionCtrlTab* expanded_tab = accordion_ctrl->getExpandedTab(); return get_if_there(mTab2AssetType, expanded_tab, LLAssetType::AT_NONE); -} + } LLAssetType::EType LLCOFWearables::getSelectedAccordionAssetType() -{ + { static LLAccordionCtrl* accordion_ctrl = getChild<LLAccordionCtrl>("cof_wearables_accordion"); const LLAccordionCtrlTab* selected_tab = accordion_ctrl->getSelectedTab(); |