diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llfolderviewitem.cpp | 5 | ||||
-rw-r--r-- | indra/llui/llfolderviewitem.h | 1 | ||||
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 227f1d79e4..bc7a2cc3f0 100644 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -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) { diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h index b6437ab61d..232780ccae 100644 --- a/indra/llui/llfolderviewitem.h +++ b/indra/llui/llfolderviewitem.h @@ -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; } diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index ca5abfd661..edcd45db79 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -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(); |