FIRE-3615, JIT Inventory cleanup 1, by Nicky Dasmijn
parent
95aa573d7e
commit
11e551f03d
|
|
@ -774,7 +774,8 @@ LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id)
|
|||
}
|
||||
|
||||
// <ND> Subfolder JIT
|
||||
if( id == getRootFolderID() )
|
||||
// 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 );
|
||||
// </ND>
|
||||
|
||||
|
|
@ -785,6 +786,7 @@ LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id)
|
|||
void LLInventoryPanel::addSubItems(const LLUUID& id)
|
||||
{
|
||||
LLInventoryObject const* objectp = gInventory.getObject(id);
|
||||
LLUUID root_id = mFolderRoot->getListener()->getUUID();
|
||||
|
||||
// If this is a folder, add the children of the folder and recursively add any
|
||||
// child folders.
|
||||
|
|
@ -797,7 +799,9 @@ void LLInventoryPanel::addSubItems(const LLUUID& id)
|
|||
mInventory->lockDirectDescendentArrays(id, categories, items);
|
||||
LLFolderViewFolder *parent_folder(0);
|
||||
|
||||
if( items && objectp )
|
||||
if (id == root_id)
|
||||
parent_folder = mFolderRoot;
|
||||
else if( items && objectp )
|
||||
parent_folder = (LLFolderViewFolder*)mFolderRoot->getItemByID(objectp->getParentUUID());
|
||||
|
||||
if(categories)
|
||||
|
|
@ -825,6 +829,10 @@ void LLInventoryPanel::addSubItems(const LLUUID& id)
|
|||
buildNewViews(item->getUUID());
|
||||
}
|
||||
}
|
||||
else if( items )
|
||||
{
|
||||
llwarns << "No parent folder for items" << llendl;
|
||||
}
|
||||
mInventory->unlockDirectDescendentArrays(id);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -190,7 +190,16 @@ BOOL LLPanelMainInventory::postBuild()
|
|||
worn_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
|
||||
//worn_items_panel->getFilter()->markDefault();
|
||||
worn_items_panel->getFilter()->setFilterObjectTypes(0xffffffff - (0x1 << LLInventoryType::IT_GESTURE));
|
||||
worn_items_panel->openAllFolders();
|
||||
|
||||
// <ND> Do not go all crazy and recurse through the whole inventory
|
||||
// worn_items_panel->openAllFolders();
|
||||
if( worn_items_panel->getRootFolder() )
|
||||
{
|
||||
worn_items_panel->getRootFolder()->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_NO);
|
||||
worn_items_panel->getRootFolder()->arrangeAll();
|
||||
}
|
||||
// </ND>
|
||||
|
||||
worn_items_panel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, worn_items_panel, _1, _2));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue