diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-01-24 11:03:22 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-01-24 11:03:22 -0500 |
commit | 361efbc07e83ec79a19d96b34aa1913dce1d0e1d (patch) | |
tree | 9d0655556ae0011fdc2ed4f8917faeb5efe29616 /indra/llui/llview.cpp | |
parent | 9e6a5d721193f181c39e58fe00073bece74b081a (diff) | |
parent | 79f1cd0a73bd86ff545ad78b9b1878e350d77416 (diff) |
merge
Diffstat (limited to 'indra/llui/llview.cpp')
-rw-r--r-- | indra/llui/llview.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 486babb0ab..004681325f 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -121,6 +121,7 @@ LLView::Params::Params() LLView::LLView(const LLView::Params& p) : mVisible(p.visible), + mInDraw(false), mName(p.name), mParentView(NULL), mReshapeFlags(FOLLOWS_NONE), @@ -333,6 +334,8 @@ void LLView::removeChild(LLView* child) //llassert_always(sDepth == 0); // Avoid re-ordering while drawing; it can cause subtle iterator bugs if (child->mParentView == this) { + // if we are removing an item we are currently iterating over, that would be bad + llassert(child->mInDraw == false); mChildList.remove( child ); child->mParentView = NULL; if (child->isCtrl()) @@ -1099,7 +1102,10 @@ void LLView::drawChildren() LLUI::pushMatrix(); { LLUI::translate((F32)viewp->getRect().mLeft, (F32)viewp->getRect().mBottom, 0.f); + // flag the fact we are in draw here, in case overridden draw() method attempts to remove this widget + viewp->mInDraw = true; viewp->draw(); + viewp->mInDraw = false; if (sDebugRects) { |