diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-12 12:53:53 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-08-12 12:53:53 +0100 |
commit | 98870dfa245c68dc1de155162afc77c1a8cefcd0 (patch) | |
tree | d2b59ec8a535f12b1d929b51ba6ad7e72950c177 /indra/newview/llwearableitemslist.cpp | |
parent | 6cab04ce2fcbcff87b5b3b8d3387b9d812dc53d3 (diff) | |
parent | 6c79b8460027acf18bc40fb357a2b13ec86a1ccf (diff) |
merge from viewer-release
Diffstat (limited to 'indra/newview/llwearableitemslist.cpp')
-rw-r--r-- | indra/newview/llwearableitemslist.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index e2a5489fcf..76ecd28b52 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -478,9 +478,9 @@ LLWearableItemTypeNameComparator::LLWearableItemTypeNameComparator() // 1. CLOTHING - sorted by name // 2. OBJECT - sorted by type // 3. BODYPART - sorted by name - mWearableOrder[LLAssetType::AT_CLOTHING] = LLWearableTypeOrder(ORDER_RANK_1, false, false); - mWearableOrder[LLAssetType::AT_OBJECT] = LLWearableTypeOrder(ORDER_RANK_2, true, true); - mWearableOrder[LLAssetType::AT_BODYPART] = LLWearableTypeOrder(ORDER_RANK_3, false, true); + mWearableOrder[LLAssetType::AT_CLOTHING] = LLWearableTypeOrder(ORDER_RANG_1, false, false); + mWearableOrder[LLAssetType::AT_OBJECT] = LLWearableTypeOrder(ORDER_RANG_2, true, true); + mWearableOrder[LLAssetType::AT_BODYPART] = LLWearableTypeOrder(ORDER_RANG_3, false, true); } void LLWearableItemTypeNameComparator::setOrder(LLAssetType::EType items_of_type, LLWearableItemTypeNameComparator::ETypeListOrder order_priority, bool sort_asset_items_by_name, bool sort_wearable_items_by_name) @@ -527,6 +527,8 @@ bool LLWearableItemTypeNameComparator::doCompare(const LLPanelInventoryListItemB const LLWearableType::EType item_wearable_type2 = wearable_item2->getWearableType(); if (item_wearable_type1 != item_wearable_type2) + // If items are of different LLWearableType::EType types they are compared + // by LLWearableType::EType. types order determined in LLWearableType::EType. { // If items are of different LLWearableType::EType types they are compared // by LLWearableType::EType. types order determined in LLWearableType::EType. @@ -549,10 +551,11 @@ LLWearableItemTypeNameComparator::ETypeListOrder LLWearableItemTypeNameComparato { wearable_type_order_map_t::const_iterator const_it = mWearableOrder.find(item_type); + if(const_it == mWearableOrder.end()) { llwarns<<"Absent information about order rang of items of "<<LLAssetType::getDesc(item_type)<<" type"<<llendl; - return ORDER_RANK_UNKNOWN; + return ORDER_RANG_UNKNOWN; } return const_it->second.mOrderPriority; @@ -562,25 +565,30 @@ bool LLWearableItemTypeNameComparator::sortAssetTypeByName(LLAssetType::EType it { wearable_type_order_map_t::const_iterator const_it = mWearableOrder.find(item_type); + if(const_it == mWearableOrder.end()) { llwarns<<"Absent information about sorting items of "<<LLAssetType::getDesc(item_type)<<" type"<<llendl; return true; } + return const_it->second.mSortAssetTypeByName; } + bool LLWearableItemTypeNameComparator::sortWearableTypeByName(LLAssetType::EType item_type) const { wearable_type_order_map_t::const_iterator const_it = mWearableOrder.find(item_type); + if(const_it == mWearableOrder.end()) { llwarns<<"Absent information about sorting items of "<<LLAssetType::getDesc(item_type)<<" type"<<llendl; return true; } + return const_it->second.mSortWearableTypeByName; } |