Skip to content

Commit f5be549

Browse files
committed
#3910 Fix sorting of 'favorites' inventory tab
1 parent 11cd9b9 commit f5be549

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

indra/newview/llfolderviewmodelinventory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void LLFolderViewModelInventory::sort( LLFolderViewFolder* folder )
6969
if (!folder->areChildrenInited() || !needsSort(folder->getViewModelItem())) return;
7070

7171
LLFolderViewModelItemInventory* sort_modelp = static_cast<LLFolderViewModelItemInventory*>(folder->getViewModelItem());
72-
if (sort_modelp->getUUID().isNull()) return;
72+
if (!sort_modelp->canSortContent()) return;
7373

7474
bool has_favorites = false;
7575
for (std::list<LLFolderViewFolder*>::iterator it = folder->getFoldersBegin(), end_it = folder->getFoldersEnd();

indra/newview/llfolderviewmodelinventory.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ class LLFolderViewModelItemInventory
5959
virtual EInventorySortGroup getSortGroup() const = 0;
6060
virtual LLInventoryObject* getInventoryObject() const = 0;
6161
virtual void requestSort();
62+
virtual bool canSortContent() const { return getUUID().notNull(); }
6263
virtual void setPassedFilter(bool filtered, S32 filter_generation, std::string::size_type string_offset = std::string::npos, std::string::size_type string_size = 0);
6364
virtual bool filter( LLFolderViewFilter& filter);
6465
virtual bool filterChildItem( LLFolderViewModelItem* item, LLFolderViewFilter& filter);

indra/newview/llinventorybridge.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,7 @@ class LLFavoritesFolderBridge : public LLFolderBridge
777777
mInvType = type;
778778
}
779779
/*virtual*/ void buildContextMenu(LLMenuGL& menu, U32 flags);
780+
/*virtual*/ bool canSortContent() const { return true; }
780781
};
781782

782783
// Bridge builder to create Inventory-Folder-View-Bridge for Recent Inventory Panel

0 commit comments

Comments
 (0)