diff options
Diffstat (limited to 'indra/newview/llfolderview.cpp')
-rw-r--r-- | indra/newview/llfolderview.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 321982ceb6..98fae1c2a0 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -330,6 +330,7 @@ BOOL LLFolderView::addFolder( LLFolderViewFolder* folder) else { mFolders.insert(mFolders.begin(), folder); + folder->setShowLoadStatus(true); } folder->setOrigin(0, 0); folder->reshape(getRect().getWidth(), 0); @@ -748,6 +749,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; @@ -1939,6 +1946,26 @@ LLFolderViewItem* LLFolderView::getItemByID(const LLUUID& id) return NULL; } +LLFolderViewFolder* LLFolderView::getFolderByID(const LLUUID& id) +{ + if (id.isNull()) + { + return this; + } + + for (folders_t::iterator iter = mFolders.begin(); + iter != mFolders.end(); + ++iter) + { + LLFolderViewFolder *folder = (*iter); + if (folder->getListener()->getUUID() == id) + { + return folder; + } + } + return NULL; +} + bool LLFolderView::doToSelected(LLInventoryModel* model, const LLSD& userdata) { std::string action = userdata.asString(); |