summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-10-15 11:40:11 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-10-15 11:40:11 +0300
commit35edd296a6f850b811c000c8b337abaa1fde9835 (patch)
tree793a65ebbb1e91db2cbc7e1e3e2b09123366ac14 /indra/newview
parentf93d237196c3b8bfef43d241fe4ae45b437a314b (diff)
Post-merge fix: Restore initRootContent()
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llinventorypanel.cpp34
-rw-r--r--indra/newview/llinventorypanel.h1
2 files changed, 23 insertions, 12 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index f374ed11e2..517224c5e0 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -975,18 +975,7 @@ void LLInventoryPanel::initializeViews(F64 max_time)
mBuildViewsEndTime = curent_time + max_time;
// init everything
- LLUUID root_id = getRootFolderID();
- if (root_id.notNull())
- {
- buildNewViews(getRootFolderID());
- }
- else
- {
- // Default case: always add "My Inventory" root first, "Library" root second
- // If we run out of time, this still should create root folders
- buildNewViews(gInventory.getRootFolderID()); // My Inventory
- buildNewViews(gInventory.getLibraryRootFolderID()); // Library
- }
+ initRootContent();
if (mBuildViewsQueue.empty() && mBuildRootQueue.empty())
{
@@ -1019,6 +1008,21 @@ void LLInventoryPanel::initializeViews(F64 max_time)
}
}
+void LLInventoryPanel::initRootContent()
+{
+ LLUUID root_id = getRootFolderID();
+ if (root_id.notNull())
+ {
+ buildNewViews(getRootFolderID());
+ }
+ else
+ {
+ // Default case: always add "My Inventory" root first, "Library" root second
+ // If we run out of time, this still should create root folders
+ buildNewViews(gInventory.getRootFolderID()); // My Inventory
+ buildNewViews(gInventory.getLibraryRootFolderID()); // Library
+ }
+}
LLFolderViewFolder * LLInventoryPanel::createFolderViewFolder(LLInvFVBridge * bridge, bool allow_drop)
{
@@ -2264,6 +2268,7 @@ protected:
friend class LLUICtrlFactory;
void findAndInitRootContent(const LLUUID& folder_id) override;
+ void initRootContent() override;
bool removeFavorite(const LLUUID& id, const LLInventoryObject* model_item);
void itemChanged(const LLUUID& item_id, U32 mask, const LLInventoryObject* model_item) override;
@@ -2353,6 +2358,11 @@ void LLInventoryFavoritesItemsPanel::findAndInitRootContent(const LLUUID& id)
}
}
+void LLInventoryFavoritesItemsPanel::initRootContent()
+{
+ findAndInitRootContent(gInventory.getRootFolderID()); // My Inventory
+}
+
bool LLInventoryFavoritesItemsPanel::removeFavorite(const LLUUID& id, const LLInventoryObject* model_item)
{
std::set<LLUUID>::iterator found = mRootContentIDs.find(id);
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 8de17f8b91..73062e41a9 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -334,6 +334,7 @@ public:
protected:
// Builds the UI. Call this once the inventory is usable.
void initializeViews(F64 max_time);
+ virtual void initRootContent();
virtual void findAndInitRootContent(const LLUUID& root_id) {};
// Specific inventory colors