Fix for lazy inventory loading. Make sure to only go one level deep when populating the tree.
parent
6e2fe985cc
commit
82d985556b
|
|
@ -2147,7 +2147,7 @@ void LLFolderViewFolder::setOpenArrangeRecursively(BOOL openitem, ERecurseType r
|
|||
if( !mIsPopulated && mParentPanel )
|
||||
{
|
||||
lldebugs << "Lazy populating " << getName() << llendl;
|
||||
mParentPanel->addSubItems( mFolderId );
|
||||
mParentPanel->addSubItems( mFolderId, 0 );
|
||||
mIsPopulated = true;
|
||||
}
|
||||
// </ND>
|
||||
|
|
|
|||
|
|
@ -476,7 +476,7 @@ void LLInventoryPanel::modelChanged(U32 mask)
|
|||
{
|
||||
view_item->destroyView();
|
||||
}
|
||||
view_item = buildNewViews(item_id);
|
||||
view_item = buildNewViews(item_id,0);
|
||||
view_folder = dynamic_cast<LLFolderViewFolder *>(view_item);
|
||||
}
|
||||
|
||||
|
|
@ -519,7 +519,7 @@ void LLInventoryPanel::modelChanged(U32 mask)
|
|||
if (model_item && !view_item)
|
||||
{
|
||||
// Add the UI element for this item.
|
||||
buildNewViews(item_id);
|
||||
buildNewViews(item_id,0);
|
||||
// Select any newly created object that has the auto rename at top of folder root set.
|
||||
if(mFolderRoot->getRoot()->needsAutoRename())
|
||||
{
|
||||
|
|
@ -634,7 +634,7 @@ LLFolderViewItem* LLInventoryPanel::rebuildViewsFor(const LLUUID& id)
|
|||
old_view->destroyView();
|
||||
}
|
||||
|
||||
return buildNewViews(id);
|
||||
return buildNewViews(id,0);
|
||||
}
|
||||
|
||||
LLFolderView * LLInventoryPanel::createFolderView(LLInvFVBridge * bridge, bool useLabelSuffix)
|
||||
|
|
@ -701,7 +701,7 @@ LLFolderViewItem * LLInventoryPanel::createFolderViewItem(LLInvFVBridge * bridge
|
|||
return LLUICtrlFactory::create<LLFolderViewItem>(params);
|
||||
}
|
||||
|
||||
LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id)
|
||||
LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id, long aRecursionCount )
|
||||
{
|
||||
LLInventoryObject const* objectp = gInventory.getObject(id);
|
||||
LLUUID root_id = mFolderRoot->getListener()->getUUID();
|
||||
|
|
@ -775,15 +775,15 @@ LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id)
|
|||
|
||||
// <ND> Subfolder JIT
|
||||
// FIRE-3615; FIRE-3616: For some panels we get a zero UUID for top level folders here. </ND>
|
||||
if( id == getRootFolderID() || getRootFolderID().isNull() || id.isNull() )
|
||||
addSubItems( id );
|
||||
if( (id == getRootFolderID() || getRootFolderID().isNull() || id.isNull()) && aRecursionCount < 1 )
|
||||
addSubItems( id, 0 );
|
||||
// </ND>
|
||||
|
||||
return itemp;
|
||||
}
|
||||
|
||||
// <ND> JIT subfolder processing
|
||||
void LLInventoryPanel::addSubItems(const LLUUID& id)
|
||||
void LLInventoryPanel::addSubItems(const LLUUID& id, long aRecursionCount)
|
||||
{
|
||||
LLInventoryObject const* objectp = gInventory.getObject(id);
|
||||
LLUUID root_id = mFolderRoot->getListener()->getUUID();
|
||||
|
|
@ -813,7 +813,7 @@ void LLInventoryPanel::addSubItems(const LLUUID& id)
|
|||
const LLViewerInventoryCategory* cat = (*cat_iter);
|
||||
//buildNewViews(cat->getUUID());
|
||||
if( !mFolderRoot->getItemByID( cat->getUUID() ) ) //ND
|
||||
buildNewViews(cat->getUUID());
|
||||
buildNewViews(cat->getUUID(), aRecursionCount+1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -826,7 +826,7 @@ void LLInventoryPanel::addSubItems(const LLUUID& id)
|
|||
const LLViewerInventoryItem* item = (*item_iter);
|
||||
//buildNewViews(cat->getUUID());
|
||||
if( !mFolderRoot->getItemByID( item->getUUID() ) ) //ND
|
||||
buildNewViews(item->getUUID());
|
||||
buildNewViews(item->getUUID(), aRecursionCount+1 );
|
||||
}
|
||||
}
|
||||
else if( items )
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ public:
|
|||
BOOL getIsViewsInitialized() const { return mViewsInitialized; }
|
||||
const LLUUID& getRootFolderID() const;
|
||||
|
||||
void addSubItems(const LLUUID& id); //ND Just-In-Time subfolder load
|
||||
void addSubItems(const LLUUID& id, long ); //ND Just-In-Time subfolder load
|
||||
|
||||
protected:
|
||||
// Builds the UI. Call this once the inventory is usable.
|
||||
|
|
@ -235,7 +235,8 @@ protected:
|
|||
LLFolderViewItem* rebuildViewsFor(const LLUUID& id); // Given the id and the parent, build all of the folder views.
|
||||
|
||||
virtual void buildFolderView(const LLInventoryPanel::Params& params);
|
||||
LLFolderViewItem* buildNewViews(const LLUUID& id);
|
||||
// LLFolderViewItem* buildNewViews(const LLUUID& id );
|
||||
LLFolderViewItem* buildNewViews(const LLUUID& id, long ); // <ND/> new arg to limit the depth of initial tree creation.
|
||||
BOOL getIsHiddenFolderType(LLFolderType::EType folder_type) const;
|
||||
|
||||
virtual LLFolderView* createFolderView(LLInvFVBridge * bridge, bool useLabelSuffix);
|
||||
|
|
|
|||
Loading…
Reference in New Issue