summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.h
diff options
context:
space:
mode:
authorDave Houlton <euclid@lindenlab.com>2021-02-02 16:11:44 +0000
committerDave Houlton <euclid@lindenlab.com>2021-02-02 16:11:44 +0000
commitde711c213820521aa8afcf991b4af561db54aede (patch)
tree108e7d0dcb12f6f827d78a0a30b28e33a8cb95f0 /indra/newview/llinventorypanel.h
parent25186d07acdeb3ba079594f8f0f8677626b1baf6 (diff)
parent7af677ab442b4bb28f009f3715b8913aecd565fa (diff)
Merged in DV528-rebase-6.4.13 (pull request #461)
DRTVWR-528 rebase to 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
};