summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2012-08-20 16:11:03 -0700
committerGilbert Gonzales <gilbert@lindenlab.com>2012-08-20 16:11:03 -0700
commitbec60ef80e72ab6df8ae0bf6b7a7824e8504426a (patch)
tree295b64dc9d31888bcbc890bf84ec95d8b7ae4999 /indra/newview/llinventorypanel.cpp
parent41cba389f89ff16c0e574ea26d6a1ceb60133ef7 (diff)
CHUI-295: Problem: The places panel implemention was incomplete and trying to make use of a class that was not fully implemented (placesfolderview). Resoltuion: Upon creation of the places panel, placesfolderview is created which contains the proper overloaded functions to show the correct menu when right clicking.
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r--indra/newview/llinventorypanel.cpp48
1 files changed, 25 insertions, 23 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 22e6943f50..03dfada77c 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -151,6 +151,30 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
}
+LLFolderView * LLInventoryPanel::createFolderRoot(LLUUID root_id )
+{
+ LLFolderView::Params p(mParams.folder_view);
+ p.name = getName();
+ p.title = getLabel();
+ p.rect = LLRect(0, 0, getRect().getWidth(), 0);
+ p.parent_panel = this;
+ p.tool_tip = p.name;
+ p.listener = mInvFVBridgeBuilder->createBridge( LLAssetType::AT_CATEGORY,
+ LLAssetType::AT_CATEGORY,
+ LLInventoryType::IT_CATEGORY,
+ this,
+ &mInventoryViewModel,
+ NULL,
+ root_id);
+ p.view_model = &mInventoryViewModel;
+ p.use_label_suffix = mParams.use_label_suffix;
+ p.allow_multiselect = mAllowMultiSelect;
+ p.show_empty_message = mShowEmptyMessage;
+ p.show_item_link_overlays = mShowItemLinkOverlays;
+ p.root = NULL;
+
+ return LLUICtrlFactory::create<LLFolderView>(p);
+}
void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params)
{
@@ -172,29 +196,7 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params)
{
// Determine the root folder in case specified, and
// build the views starting with that folder.
-
-
- LLFolderView::Params p(mParams.folder_view);
- p.name = getName();
- p.title = getLabel();
- p.rect = LLRect(0, 0, getRect().getWidth(), 0);
- p.parent_panel = this;
- p.tool_tip = p.name;
- p.listener = mInvFVBridgeBuilder->createBridge( LLAssetType::AT_CATEGORY,
- LLAssetType::AT_CATEGORY,
- LLInventoryType::IT_CATEGORY,
- this,
- &mInventoryViewModel,
- NULL,
- root_id);
- p.view_model = &mInventoryViewModel;
- p.use_label_suffix = mParams.use_label_suffix;
- p.allow_multiselect = mAllowMultiSelect;
- p.show_empty_message = mShowEmptyMessage;
- p.show_item_link_overlays = mShowItemLinkOverlays;
- p.root = NULL;
-
- mFolderRoot = LLUICtrlFactory::create<LLFolderView>(p);
+ mFolderRoot = createFolderRoot(root_id);
addItemID(root_id, mFolderRoot);
}