SL-19686 reduce delay when switching between folders

master
Maxim Nikolenko 2023-05-16 18:03:57 +03:00
parent 4d3a8f4a6c
commit 474012abd6
3 changed files with 8 additions and 2 deletions

View File

@ -1769,6 +1769,11 @@ BOOL LLFolderViewFolder::isRemovable()
return TRUE;
}
void LLFolderViewFolder::destroyRoot()
{
delete this;
}
// this is an internal method used for adding items to folders.
void LLFolderViewFolder::addItem(LLFolderViewItem* item)
{

View File

@ -394,6 +394,7 @@ public:
// destroys this folder, and all children
virtual void destroyView();
void destroyRoot();
// whether known children are fully loaded (arrange sets to true)
virtual bool isFolderComplete() { return mIsFolderComplete; }

View File

@ -2195,8 +2195,8 @@ void LLInventorySingleFolderPanel::updateSingleFolderRoot()
LLUUID root_id = mFolderID;
if (mFolderRoot.get())
{
removeItemID(getRootFolderID());
mFolderRoot.get()->destroyView();
mItemMap.clear();
mFolderRoot.get()->destroyRoot();
}
mCommitCallbackRegistrar.pushScope();