diff options
author | Merov Linden <merov@lindenlab.com> | 2012-09-24 19:55:31 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-09-24 19:55:31 -0700 |
commit | 5b0e06108b3c4373c55103dedab3306f06d392c9 (patch) | |
tree | 0751aa10cafd8afdde0a48586214a51da8fff750 /indra/llui | |
parent | 552f288a0caea45e30a231478a19f4243d69689c (diff) |
CHUI-340 : Fix dupe items in the conversation model list. Refresh when resorting.
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llfolderviewmodel.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h index c99fa07c8b..c6030c9b71 100644 --- a/indra/llui/llfolderviewmodel.h +++ b/indra/llui/llfolderviewmodel.h @@ -254,6 +254,16 @@ public: virtual void addChild(LLFolderViewModelItem* child) { + // Avoid duplicates: bail out if that child is already present in the list + // Note: this happens when models are created before views + child_list_t::const_iterator iter; + for (iter = mChildren.begin(); iter != mChildren.end(); iter++) + { + if (child == *iter) + { + return; + } + } mChildren.push_back(child); child->setParent(this); dirtyFilter(); |