diff options
author | Merov Linden <merov@lindenlab.com> | 2014-08-02 14:42:42 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-08-02 14:42:42 -0700 |
commit | 02978ddea555da1cc33403bba94ada5f54318c16 (patch) | |
tree | 4fc1c04b2655accd547759ac89dbaefa8a8c2727 | |
parent | 869cacd0426b5a1196f6979889b949f1337a7293 (diff) |
DD-160 : Open the root folder widget on creation in inventory panels that requires one
-rwxr-xr-x | indra/newview/llinventorypanel.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 3b18b86f57..443d243816 100755 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -791,6 +791,7 @@ LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id) // Force the creation of an extra root level folder item if required by the inventory panel (default is "false") bool allow_drop = true; + bool create_root = false; if (mParams.show_root_folder) { LLUUID root_id = getRootFolderID(); @@ -800,6 +801,7 @@ LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id) parent_folder = dynamic_cast<LLFolderViewFolder*>(folder_view_item); folder_view_item = NULL; allow_drop = mParams.allow_drop_on_root; + create_root = true; } } @@ -849,11 +851,16 @@ LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id) } if (folder_view_item) - { + { llassert(parent_folder != NULL); folder_view_item->addToFolder(parent_folder); addItemID(id, folder_view_item); - } + // In the case of the root folder been shown, open that folder by default once the widget is created + if (create_root) + { + folder_view_item->setOpen(TRUE); + } + } } // If this is a folder, add the children of the folder and recursively add any |