diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2025-04-18 18:11:09 +0300 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2025-04-18 18:11:09 +0300 |
| commit | 01f73fe120244f1849e987f0273e2bbbbb87d342 (patch) | |
| tree | 69843c7cdef5db189b605d13a554ad0f0c9c54d8 /indra/newview/lloutfitgallery.cpp | |
| parent | 082c9158b2ad961b747ca6a7bd55bc2a79f27b6a (diff) | |
| parent | d3d8513c3b5a7f25adac777d9d59896d8dbd14c0 (diff) | |
Merge branch 'release/2025.05' into marchcat/05-develop
Diffstat (limited to 'indra/newview/lloutfitgallery.cpp')
| -rw-r--r-- | indra/newview/lloutfitgallery.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index 1767990aed..7ab63be009 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -432,24 +432,28 @@ bool compareGalleryItem(LLOutfitGalleryItem* item1, LLOutfitGalleryItem* item2) switch (sort_by_name()) { case 2: + // Sort by favorites - favorite items first, then alphabetically if (item1->isFavorite() != item2->isFavorite()) { return item1->isFavorite(); + } break; case 1: + // Sort by images - items with non-default images first, then alphabetically if (item1->isDefaultImage() != item2->isDefaultImage()) + { + return item2->isDefaultImage(); + } break; default: + // Sort alphabetically only break; } + // Final comparison is always alphabetical by name std::string name1 = item1->getItemName(); std::string name2 = item2->getItemName(); return (LLStringUtil::compareDict(name1, name2) < 0); - } - { - return item2->isDefaultImage(); - } } void LLOutfitGallery::reArrangeRows(S32 row_diff) |
