diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-05-02 15:22:21 +0300 |
---|---|---|
committer | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-05-02 15:22:21 +0300 |
commit | 002ff88a130b16f03e26e159f7ea5f38782b16b6 (patch) | |
tree | dae80a0127394d7c2388e66ffcbeda81af674037 /indra/newview | |
parent | 03c263a1cdd88ec5967e751cba8640edf9896e51 (diff) |
SL-19650 don't rebuild views right after initialising panel
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llinventorypanel.h | 2 |
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"), |