diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-04-27 19:58:24 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-04-28 18:13:14 +0300 |
commit | 694c6e1d84d20413f97dabf7bbca6a3d6b5c59f9 (patch) | |
tree | adf6b120e22b7d89a6125267fc51e52ff9bd90cb /indra/newview/llinventorypanel.h | |
parent | 5d7dc08d71f291cf18951c536b8bd2426892bce5 (diff) |
SL-13119 Optimize initialization of inventory views
Diffstat (limited to 'indra/newview/llinventorypanel.h')
-rw-r--r-- | indra/newview/llinventorypanel.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index b55eb2b828..adca8ad3e2 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -325,8 +325,15 @@ protected: static LLUIColor sLibraryColor; static LLUIColor sLinkColor; - virtual LLFolderViewItem* buildNewViews(const LLUUID& id); - LLFolderViewItem* buildNewViews(const LLUUID& id, LLInventoryObject const* objectp); + LLFolderViewItem* buildNewViews(const LLUUID& id); + LLFolderViewItem* buildNewViews(const LLUUID& id, + LLInventoryObject const* objectp); + LLFolderViewItem* buildNewViews(const LLUUID& id, + LLInventoryObject const* objectp, + LLFolderViewItem *target_view); + // if certain types are not allowed, no reason to create views + virtual bool typedViewsFilter(const LLUUID& id, LLInventoryObject const* objectp) { return true; } + virtual void itemChanged(const LLUUID& item_id, U32 mask, const LLInventoryObject* model_item); BOOL getIsHiddenFolderType(LLFolderType::EType folder_type) const; @@ -334,6 +341,14 @@ protected: virtual LLFolderViewFolder* createFolderViewFolder(LLInvFVBridge * bridge, bool allow_drop); virtual LLFolderViewItem* createFolderViewItem(LLInvFVBridge * bridge); private: + // buildViewsTree does not include some checks and is meant + // for recursive use, use buildNewViews() for first call + LLFolderViewItem* buildViewsTree(const LLUUID& id, + const LLUUID& parent_id, + LLInventoryObject const* objectp, + LLFolderViewItem *target_view, + LLFolderViewFolder *parent_folder_view); + bool mBuildDefaultHierarchy; // default inventory hierarchy should be created in postBuild() bool mViewsInitialized; // Views have been generated }; |