diff options
Diffstat (limited to 'indra/newview/llfolderviewitem.cpp')
-rw-r--r-- | indra/newview/llfolderviewitem.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index f154de39c9..76607e4874 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -1339,10 +1339,6 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter) if (folder->getFiltered() || folder->hasFilteredDescendants(filter.getMinRequiredGeneration())) { mMostFilteredDescendantGeneration = filter_generation; - if (getRoot()->needsAutoSelect() && autoopen_folders) - { - folder->setOpenArrangeRecursively(TRUE); - } } // just skip it, it has already been filtered continue; @@ -1859,10 +1855,9 @@ EInventorySortGroup LLFolderViewFolder::getSortGroup() const return SG_TRASH_FOLDER; } - // Folders that can't be moved are 'system' folders. if( mListener ) { - if( !(mListener->isItemMovable()) ) + if(LLFolderType::lookupIsProtectedType(mListener->getPreferredType())) { return SG_SYSTEM_FOLDER; } @@ -2548,8 +2543,12 @@ bool LLInventorySort::operator()(const LLFolderViewItem* const& a, const LLFolde { // *TODO: mantipov: probably it is better to add an appropriate method to LLFolderViewItem // or to LLInvFVBridge - S32 a_sort = (static_cast<const LLItemBridge*>(a->getListener()))->getItem()->getSortField(); - S32 b_sort = (static_cast<const LLItemBridge*>(b->getListener()))->getItem()->getSortField(); + LLViewerInventoryItem* aitem = (static_cast<const LLItemBridge*>(a->getListener()))->getItem(); + LLViewerInventoryItem* bitem = (static_cast<const LLItemBridge*>(b->getListener()))->getItem(); + if (!aitem || !bitem) + return false; + S32 a_sort = aitem->getSortField(); + S32 b_sort = bitem->getSortField(); return a_sort < b_sort; } } |