summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llinventorypanel.cpp14
-rw-r--r--indra/newview/llinventorypanel.h2
2 files changed, 11 insertions, 5 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 2c7c6d2056..c8c9d6c351 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -907,7 +907,10 @@ void LLInventoryPanel::initializeViews(F64 max_time)
gIdleCallbacks.addFunction(idle, this);
- openStartFolderOrMyInventory();
+ if(mParams.open_first_folder)
+ {
+ openStartFolderOrMyInventory();
+ }
// Special case for new user login
if (gAgent.isFirstLogin())
@@ -2098,10 +2101,11 @@ void LLInventorySingleFolderPanel::setSelectCallback(const boost::function<void(
void LLInventorySingleFolderPanel::initFromParams(const Params& p)
{
- Params fav_params(p);
- fav_params.start_folder.id = gInventory.getRootFolderID();
- LLInventoryPanel::initFromParams(p);
- changeFolderRoot(gInventory.getRootFolderID());
+ mFolderID = gInventory.getRootFolderID();
+ Params pane_params(p);
+ pane_params.open_first_folder = false;
+ pane_params.start_folder.id = mFolderID;
+ LLInventoryPanel::initFromParams(pane_params);
}
void LLInventorySingleFolderPanel::openInCurrentWindow(const LLSD& userdata)
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index fb2419ada7..d334d55611 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -107,6 +107,7 @@ public:
Optional<LLFolderView::Params> folder_view;
Optional<LLFolderViewFolder::Params> folder;
Optional<LLFolderViewItem::Params> item;
+ Optional<bool> open_first_folder;
// All item and folder views will be initialized on init if true (default)
// Will initialize on visibility change otherwise.
@@ -126,6 +127,7 @@ public:
show_root_folder("show_root_folder", false),
allow_drop_on_root("allow_drop_on_root", true),
use_marketplace_folders("use_marketplace_folders", false),
+ open_first_folder("open_first_folder", true),
scroll("scroll"),
accepts_drag_and_drop("accepts_drag_and_drop"),
folder_view("folder_view"),