summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
authorRye Mutt <rye@alchemyviewer.org>2022-10-19 16:19:33 -0400
committerRye Mutt <rye@alchemyviewer.org>2022-10-19 16:21:05 -0400
commitb9552e596fdeaf577d1de1e6d4d2ba5d46bceeb9 (patch)
tree8036e037008d603f338c311d5cc0d2f21d40bca7 /indra/newview/llinventorypanel.cpp
parent1fb1a9df7a6664946f1f758330a0e6cfaef0dd8f (diff)
Reduce folderview menu bloat via lazy creation on right click
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r--indra/newview/llinventorypanel.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 6b102c7500..c065c76dca 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -211,7 +211,11 @@ LLFolderView * LLInventoryPanel::createFolderRoot(LLUUID root_id )
p.allow_drop = mParams.allow_drop_on_root;
p.options_menu = "menu_inventory.xml";
- return LLUICtrlFactory::create<LLFolderView>(p);
+ LLFolderView* fv = LLUICtrlFactory::create<LLFolderView>(p);
+ fv->setCallbackRegistrar(&mCommitCallbackRegistrar);
+ fv->setEnableRegistrar(&mEnableCallbackRegistrar);
+
+ return fv;
}
void LLInventoryPanel::clearFolderRoot()
@@ -264,6 +268,7 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params)
}
mCommitCallbackRegistrar.popScope();
mFolderRoot.get()->setCallbackRegistrar(&mCommitCallbackRegistrar);
+ mFolderRoot.get()->setEnableRegistrar(&mEnableCallbackRegistrar);
// Scroller
LLRect scroller_view_rect = getRect();