diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2025-04-16 14:30:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-16 14:30:35 +0300 |
commit | d464901e47ab0d55597a6a5b3b65a18492ef8004 (patch) | |
tree | 2bbd2e519660f21fe9337439196ba6bc8d97e2c4 /indra/newview | |
parent | ae931987356a71dbe8fc7ec31f2a2fe9108b4495 (diff) |
Post-merge fix compareGalleryItem() in lloutfitgallery.cpp (#3917)
Diffstat (limited to 'indra/newview')
-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) |