diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-08-03 16:28:58 +0300 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-08-03 16:28:58 +0300 |
commit | e2135bd6dd7668560f5b3af5e1a7549488caa2ab (patch) | |
tree | a033e2809d98ebea2fa74a5808c235276f5f5df2 /indra/newview/llcofwearables.cpp | |
parent | b12201bf01caeef0f5a13951980be187ac3936c8 (diff) | |
parent | d10b9a7f37bec670342136eeea2c8c2604fdfeef (diff) |
Merge from default branch
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llcofwearables.cpp')
-rw-r--r-- | indra/newview/llcofwearables.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/indra/newview/llcofwearables.cpp b/indra/newview/llcofwearables.cpp index 629a92db11..893400185c 100644 --- a/indra/newview/llcofwearables.cpp +++ b/indra/newview/llcofwearables.cpp @@ -284,7 +284,8 @@ LLCOFWearables::LLCOFWearables() : LLPanel(), mAttachmentsTab(NULL), mBodyPartsTab(NULL), mLastSelectedTab(NULL), - mAccordionCtrl(NULL) + mAccordionCtrl(NULL), + mCOFVersion(-1) { mClothingMenu = new CofClothingContextMenu(this); mAttachmentMenu = new CofAttachmentContextMenu(this); @@ -381,6 +382,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; @@ -396,7 +414,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); @@ -504,7 +522,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; } |