summaryrefslogtreecommitdiff
path: root/indra/llui/llfolderviewitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llfolderviewitem.cpp')
-rw-r--r--indra/llui/llfolderviewitem.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index b9b6ea7444..0f486d06c9 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -89,7 +89,8 @@ LLFolderViewItem::Params::Params()
selection_image("selection_image"),
item_height("item_height"),
item_top_pad("item_top_pad"),
- creation_date()
+ creation_date(),
+ allow_open("allow_open", true)
{}
// Default constructor
@@ -112,7 +113,8 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p)
mLabel(p.name),
mRoot(p.root),
mViewModelItem(p.listener),
- mIsMouseOverTitle(false)
+ mIsMouseOverTitle(false),
+ mAllowOpen(p.allow_open)
{
if (mViewModelItem)
{
@@ -404,8 +406,11 @@ void LLFolderViewItem::buildContextMenu(LLMenuGL& menu, U32 flags)
void LLFolderViewItem::openItem( void )
{
+ if (mAllowOpen)
+ {
getViewModelItem()->openItem();
}
+}
void LLFolderViewItem::rename(const std::string& new_name)
{
@@ -517,7 +522,7 @@ BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask )
BOOL LLFolderViewItem::handleDoubleClick( S32 x, S32 y, MASK mask )
{
- getViewModelItem()->openItem();
+ openItem();
return TRUE;
}
@@ -1552,7 +1557,7 @@ BOOL LLFolderViewFolder::addFolder(LLFolderViewFolder* folder)
requestSort();
getViewModelItem()->addChild(folder->getViewModelItem());
-
+ //After addChild since addChild assigns parent to bubble up to when calling dirtyFilter
folder->getViewModelItem()->dirtyFilter();
return TRUE;