SL-19649 Don't update bounding rect excesively

meow-7.2.2
Andrey Kleshchev 2023-05-12 22:15:56 +03:00
parent a6d867bcce
commit 4d3a8f4a6c
1 changed files with 7 additions and 1 deletions

View File

@ -311,7 +311,13 @@ bool LLView::addChild(LLView* child, S32 tab_group)
}
child->mParentView = this;
updateBoundingRect();
if (getVisible() && child->getVisible())
{
// if child isn't visible it won't affect bounding rect
// if current view is not visible it will be recalculated
// on visibility change
updateBoundingRect();
}
mLastTabGroup = tab_group;
return true;
}