diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-07-26 18:57:54 -0700 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-07-26 18:57:54 -0700 |
commit | 1e65ba1f909604b027cb7dee5631f698a9f550a8 (patch) | |
tree | dd148c7d32267212c7eb27017dab652f87446836 /indra/newview/llpanelobjectinventory.cpp | |
parent | 5221e48ef64d3965f6d4d3dbf0f937982230d11c (diff) |
CHUI-251: Adding back in the root 'Contents' folder under the Build floater Content tab.
Diffstat (limited to 'indra/newview/llpanelobjectinventory.cpp')
-rw-r--r-- | indra/newview/llpanelobjectinventory.cpp | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index fe1ff01bc2..5887f4d244 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -1656,13 +1656,9 @@ void LLPanelObjectInventory::updateInventory() if (inventory_root) { reset(); - mIsInventoryEmpty = contents.empty(); - if (!mIsInventoryEmpty) - { - - createFolderViews(inventory_root, contents); - mFolders->setEnabled(TRUE); - } + mIsInventoryEmpty = FALSE; + createFolderViews(inventory_root, contents); + mFolders->setEnabled(TRUE); } else { @@ -1725,7 +1721,20 @@ void LLPanelObjectInventory::createFolderViews(LLInventoryObject* inventory_root bridge = LLTaskInvFVBridge::createObjectBridge(this, inventory_root); if(bridge) { - createViewsForCategory(&contents, inventory_root, mFolders); + LLFolderViewFolder::Params p; + p.name = inventory_root->getName(); + p.tool_tip = p.name; + p.root = mFolders; + p.listener = bridge; + + LLFolderViewFolder* new_folder = LLUICtrlFactory::create<LLFolderViewFolder>(p); + new_folder->addToFolder(mFolders); + new_folder->toggleOpen(); + + if (!contents.empty()) + { + createViewsForCategory(&contents, inventory_root, new_folder); + } } } |