diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-07-26 14:01:45 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-07-26 14:01:45 +0100 |
commit | 400f7db2d992a969ab9c18a8c4a68beb28b87b20 (patch) | |
tree | 865622670a13875fb6a769a31089723022db079a /indra/newview/llwearableitemslist.cpp | |
parent | 44d0fd81ee3d26a80068713182ac19885ea40f95 (diff) |
Conflict resolution. Erring on the side of viewer-release.
Diffstat (limited to 'indra/newview/llwearableitemslist.cpp')
-rw-r--r-- | indra/newview/llwearableitemslist.cpp | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index d9b2dfbec0..fe8c09e329 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -572,10 +572,8 @@ bool LLWearableItemTypeNameComparator::sortAssetTypeByName(LLAssetType::EType it } bool LLWearableItemTypeNameComparator::sortWearableTypeByName(LLAssetType::EType item_type) const -bool LLWearableItemCreationDateComparator::doCompare(const LLPanelInventoryListItemBase* item1, const LLPanelInventoryListItemBase* item2) const { wearable_type_order_map_t::const_iterator const_it = mWearableOrder.find(item_type); - time_t date2 = item2->getCreationDate(); if(const_it == mWearableOrder.end()) { @@ -585,14 +583,11 @@ bool LLWearableItemCreationDateComparator::doCompare(const LLPanelInventoryListI return const_it->second.mSortWearableTypeByName; } - ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// static const LLWearableItemTypeNameComparator WEARABLE_TYPE_NAME_COMPARATOR; -static const LLWearableItemNameComparator WEARABLE_NAME_COMPARATOR; -static const LLWearableItemCreationDateComparator WEARABLE_CREATION_DATE_COMPARATOR; static const LLDefaultChildRegistry::Register<LLWearableItemsList> r("wearable_items_list"); @@ -604,7 +599,7 @@ LLWearableItemsList::Params::Params() LLWearableItemsList::LLWearableItemsList(const LLWearableItemsList::Params& p) : LLInventoryItemsList(p) { - setSortOrder(E_SORT_BY_TYPE, false); + setComparator(&WEARABLE_TYPE_NAME_COMPARATOR); mIsStandalone = p.standalone; if (mIsStandalone) { @@ -704,32 +699,6 @@ void LLWearableItemsList::onRightClick(S32 x, S32 y) ContextMenu::instance().show(this, selected_uuids, x, y); } -void LLWearableItemsList::setSortOrder(ESortOrder sort_order, bool sort_now) -{ - switch (sort_order) - { - case E_SORT_BY_MOST_RECENT: - setComparator(&WEARABLE_CREATION_DATE_COMPARATOR); - break; - case E_SORT_BY_NAME: - setComparator(&WEARABLE_NAME_COMPARATOR); - break; - case E_SORT_BY_TYPE: - setComparator(&WEARABLE_TYPE_NAME_COMPARATOR); - break; - - // No "default:" to raise compiler warning - // if we're not handling something - } - - mSortOrder = sort_order; - - if (sort_now) - { - sort(); - } -} - ////////////////////////////////////////////////////////////////////////// /// ContextMenu ////////////////////////////////////////////////////////////////////////// |