summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-07-29 18:20:05 -0700
committerMerov Linden <merov@lindenlab.com>2014-07-29 18:20:05 -0700
commitc182a8b79737a67794c032a6b60b038c9b905f57 (patch)
tree66c96687107a76097ebfbba47432b356f09d31ca /indra/newview/llinventorypanel.cpp
parent51e4ad0ed0ba07328ec8415742a3f5c60afc7244 (diff)
DD-69 : Fixed! Added an xml parameter to optionally allow the visualization of the root folder on an inventory panel. Used only for marketplace floater so far.
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rwxr-xr-xindra/newview/llinventorypanel.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index b386daa77b..4bfac96a11 100755
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -787,6 +787,18 @@ LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id)
const LLUUID &parent_id = objectp->getParentUUID();
LLFolderViewFolder* parent_folder = (LLFolderViewFolder*)getItemByID(parent_id);
+ // Force the creation of an extra root level folder item if required by the inventory panel (default is "false")
+ if (mParams.show_root_folder)
+ {
+ LLUUID root_id = getRootFolderID();
+ if (root_id == id)
+ {
+ // We insert an extra level that's seen by the UI but has no influence on the model
+ parent_folder = dynamic_cast<LLFolderViewFolder*>(folder_view_item);
+ folder_view_item = NULL;
+ }
+ }
+
if (!folder_view_item && parent_folder)
{
if (objectp->getType() <= LLAssetType::AT_NONE ||