summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.h
diff options
context:
space:
mode:
authorDave Houlton <euclid@lindenlab.com>2021-02-01 15:59:08 -0700
committerDave Houlton <euclid@lindenlab.com>2021-02-01 15:59:08 -0700
commitf07b332ef0aafd1ecb82b6077309a5292c9cddc1 (patch)
treea76fabd4f71bdbb86b7fe6efb9a6acc0529a429c /indra/newview/llinventorypanel.h
parentbaa81473149b9d5a6718529c4de08393e8a02b92 (diff)
parent21565a1f3fe1ae737e2f91c58be2c3cb0b5a2fec (diff)
Merge branch 'master' into DV525-merge-6.4.13
Diffstat (limited to 'indra/newview/llinventorypanel.h')
-rw-r--r--indra/newview/llinventorypanel.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index c202333f45..ad6010f09c 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -108,6 +108,10 @@ public:
Optional<LLFolderViewFolder::Params> folder;
Optional<LLFolderViewItem::Params> item;
+ // All item and folder views will be initialized on init if true (default)
+ // Will initialize on visibility change otherwise.
+ Optional<bool> preinitialize_views;
+
Params()
: sort_order_setting("sort_order_setting"),
inventory("", &gInventory),
@@ -126,7 +130,8 @@ public:
accepts_drag_and_drop("accepts_drag_and_drop"),
folder_view("folder_view"),
folder("folder"),
- item("item")
+ item("item"),
+ preinitialize_views("preinitialize_views", true)
{}
};
@@ -154,6 +159,7 @@ public:
LLFolderViewModelInventory& getRootViewModel() { return mInventoryViewModel; }
// LLView methods
+ /*virtual*/ void onVisibilityChange(BOOL new_visibility);
void draw();
/*virtual*/ BOOL handleKeyHere( KEY key, MASK mask );
BOOL handleHover(S32 x, S32 y, MASK mask);
@@ -313,7 +319,7 @@ public:
void addHideFolderType(LLFolderType::EType folder_type);
public:
- BOOL getIsViewsInitialized() const { return mViewsInitialized; }
+ bool getViewsInitialized() const { return mViewsInitialized == VIEWS_INITIALIZED; }
protected:
// Builds the UI. Call this once the inventory is usable.
void initializeViews();
@@ -349,8 +355,15 @@ private:
LLFolderViewItem *target_view,
LLFolderViewFolder *parent_folder_view);
- bool mBuildDefaultHierarchy; // default inventory hierarchy should be created in postBuild()
- bool mViewsInitialized; // Views have been generated
+ typedef enum e_views_initialization_state
+ {
+ VIEWS_UNINITIALIZED = 0,
+ VIEWS_INITIALIZING,
+ VIEWS_INITIALIZED,
+ } EViewsInitializationState;
+
+ bool mBuildViewsOnInit;
+ EViewsInitializationState mViewsInitialized; // Whether views have been generated
};