summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-07-19 20:38:07 -0700
committerMerov Linden <merov@lindenlab.com>2012-07-19 20:38:07 -0700
commitefa73d4975afda19ee5255d5cca33fa96fc21eb4 (patch)
tree6fceea8d9359380c337d7f0f67e612bfb3dbe8be /indra/newview/llinventorypanel.cpp
parent15f6f877f923ecc85489c0159ca62deb02de1201 (diff)
CHUI-236 : WIP : Places panel works for My Inventory but still empty lists for Favorites Bar, My Landmarks and Library.
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r--indra/newview/llinventorypanel.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index ed370e9add..340f851ed8 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -193,6 +193,15 @@ void LLInventoryPanel::buildFolderView(const LLInventoryPanel::Params& params)
void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params)
{
+ // Clear up the root view
+ // Note: This needs to be done *before* we build the new folder view
+ LLFolderViewItem* root_view = getItemByID(gInventory.getRootFolderID());
+ if (root_view)
+ {
+ removeItemID(static_cast<LLFolderViewModelItemInventory*>(root_view->getViewModelItem())->getUUID());
+ root_view->destroyView();
+ }
+
LLMemType mt(LLMemType::MTYPE_INVENTORY_POST_BUILD);
mCommitCallbackRegistrar.pushScope(); // registered as a widget; need to push callback scope ourselves
@@ -228,6 +237,7 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params)
{
initializeViews();
}
+
gIdleCallbacks.addFunction(onIdle, (void*)this);
if (mSortOrderSetting != INHERIT_SORT_ORDER)
@@ -595,7 +605,7 @@ void LLInventoryPanel::initializeViews()
{
if (!gInventory.isInventoryUsable()) return;
- rebuildViewsFor(gInventory.getRootFolderID());
+ buildNewViews(gInventory.getRootFolderID());
gIdleCallbacks.addFunction(idle, this);
@@ -622,19 +632,6 @@ void LLInventoryPanel::initializeViews()
}
}
-LLFolderViewItem* LLInventoryPanel::rebuildViewsFor(const LLUUID& id)
-{
- // Destroy the old view for this ID so we can rebuild it.
- LLFolderViewItem* old_view = getItemByID(id);
- if (old_view)
- {
- old_view->destroyView();
- removeItemID(static_cast<LLFolderViewModelItemInventory*>(old_view->getViewModelItem())->getUUID());
- }
-
- return buildNewViews(id);
-}
-
LLFolderView * LLInventoryPanel::createFolderView(LLInvFVBridge * bridge, bool useLabelSuffix)
{
LLRect folder_rect(0,