summaryrefslogtreecommitdiff
path: root/indra/llui/llfolderviewitem.cpp
diff options
context:
space:
mode:
authorWilliam Todd Stinson <stinson@lindenlab.com>2012-12-19 10:26:17 -0800
committerWilliam Todd Stinson <stinson@lindenlab.com>2012-12-19 10:26:17 -0800
commit865981c59f37c3d355ba00dc31004e56e293a360 (patch)
tree281913cecb41469ac9dcc2fe4f3f19ba8077fe3f /indra/llui/llfolderviewitem.cpp
parentbd6d34d312c3e3322ab62f3a60253fb88fcbc9e3 (diff)
parentb34e3a1b40fd72b4c4cdc1553c3f5934e9e9cef5 (diff)
Pull and merge from ssh://stinson@hg.lindenlab.com/richard/viewer-chui.
Diffstat (limited to 'indra/llui/llfolderviewitem.cpp')
-rwxr-xr-xindra/llui/llfolderviewitem.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 0a06ce66aa..dc7e4777a7 100755
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -1481,17 +1481,20 @@ void LLFolderViewFolder::extendSelectionTo(LLFolderViewItem* new_selection)
void LLFolderViewFolder::destroyView()
{
- std::for_each(mItems.begin(), mItems.end(), DeletePointer());
- mItems.clear();
+ while (!mItems.empty())
+ {
+ LLFolderViewItem *itemp = mItems.back();
+ itemp->destroyView(); // LLFolderViewItem::destroyView() removes entry from mItems
+ }
while (!mFolders.empty())
{
LLFolderViewFolder *folderp = mFolders.back();
- folderp->destroyView(); // removes entry from mFolders
+ folderp->destroyView(); // LLFolderVievFolder::destroyView() removes entry from mFolders
}
LLFolderViewItem::destroyView();
- }
+}
// extractItem() removes the specified item from the folder, but
// doesn't delete it.