summaryrefslogtreecommitdiff
path: root/indra/llui/llfolderviewmodel.h
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-04-30 03:04:06 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-04-30 03:04:06 +0300
commite00edbeb4a7edfe4f190ac7bf2197aa8240e50c6 (patch)
tree25db350e573224fc2900c1e760f7cf429c599abe /indra/llui/llfolderviewmodel.h
parent3ad10e3075840b442f3a8f4593b4b4f10bad48e0 (diff)
parentce65bc2f13409d75dbc6502c970030cc5ed2e5ad (diff)
Merge branch 'master' into DRTVWR-522-maint
# Conflicts: # doc/contributions.txt
Diffstat (limited to 'indra/llui/llfolderviewmodel.h')
-rw-r--r--indra/llui/llfolderviewmodel.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h
index f4ddfa8f18..e62b2779dd 100644
--- a/indra/llui/llfolderviewmodel.h
+++ b/indra/llui/llfolderviewmodel.h
@@ -204,6 +204,7 @@ public:
virtual bool hasChildren() const = 0;
virtual void addChild(LLFolderViewModelItem* child) = 0;
virtual void removeChild(LLFolderViewModelItem* child) = 0;
+ virtual void clearChildren() = 0;
// This method will be called to determine if a drop can be
// performed, and will set drop to TRUE if a drop is
@@ -301,9 +302,8 @@ public:
virtual void clearChildren()
{
- // As this is cleaning the whole list of children wholesale, we do need to delete the pointed objects
- // This is different and not equivalent to calling removeChild() on each child
- std::for_each(mChildren.begin(), mChildren.end(), DeletePointer());
+ // We are working with models that belong to views as LLPointers, clean the list, let poiters handle the rest
+ std::for_each(mChildren.begin(), mChildren.end(), [](LLFolderViewModelItem* c) {c->setParent(NULL); });
mChildren.clear();
dirtyDescendantsFilter();
dirtyFilter();