summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfolderview.cpp11
-rw-r--r--indra/newview/llfolderviewitem.cpp10
2 files changed, 10 insertions, 11 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 8fd69304ad..29ed70dea5 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -320,15 +320,10 @@ void LLFolderView::setSortOrder(U32 order)
if (order != mSortOrder)
{
LLFastTimer t(FTM_SORT);
+
mSortOrder = order;
-
- for (folders_t::iterator iter = mFolders.begin();
- iter != mFolders.end();)
- {
- folders_t::iterator fit = iter++;
- (*fit)->sortBy(order);
- }
-
+
+ sortBy(order);
arrangeAll();
}
}
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index b76e8395fb..8f56d81232 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -1902,9 +1902,13 @@ void LLFolderViewFolder::sortBy(U32 order)
folders_t::iterator fit = iter++;
(*fit)->sortBy(order);
}
-
- mFolders.sort(mSortFunction);
- mItems.sort(mSortFunction);
+
+ // Don't sort the topmost folders (My Inventory and Library)
+ if (mListener->getUUID().notNull())
+ {
+ mFolders.sort(mSortFunction);
+ mItems.sort(mSortFunction);
+ }
if (order & LLInventoryFilter::SO_DATE)
{