diff options
-rw-r--r-- | indra/newview/llfolderview.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llfolderviewitem.cpp | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index adf7f08702..640b0d7d8f 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -748,6 +748,12 @@ void LLFolderView::sanitizeSelection() } } } + + // Don't allow invisible items (such as root folders) to be selected. + if (item->getDontShowInHierarchy()) + { + items_to_remove.push_back(item); + } } std::vector<LLFolderViewItem*>::iterator item_it; diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 135821f662..c2607dcc9a 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -198,7 +198,9 @@ LLFolderViewItem* LLFolderViewItem::getPreviousOpenNode(BOOL include_children) } LLFolderViewItem* itemp = mParentFolder->getPreviousFromChild( this, include_children ); - while(itemp && !itemp->getVisible()) + + // Skip over items that are invisible or are hidden from the UI. + while(itemp && (!itemp->getVisible() || itemp->getDontShowInHierarchy())) { LLFolderViewItem* next_itemp = itemp->mParentFolder->getPreviousFromChild( itemp, include_children ); if (itemp == next_itemp) |