diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2023-07-21 11:27:55 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2023-07-21 11:27:55 -0400 |
commit | 25330b47f961b68df046665ce0576e6f23d1f3e5 (patch) | |
tree | db84983b338972d1c332b45742c643f9d18c3fe3 /indra/llui/lllayoutstack.cpp | |
parent | 248f78b45ec9ee275f3b97e50b9962f2e54dbde2 (diff) | |
parent | ec4135da63a3f3877222fba4ecb59b15650371fe (diff) |
SL-18837: Merge branch 'main' of secondlife/viewer into actions
Diffstat (limited to 'indra/llui/lllayoutstack.cpp')
-rw-r--r-- | indra/llui/lllayoutstack.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 77938edf27..ae9dba5945 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -282,6 +282,17 @@ void LLLayoutStack::draw() } } +void LLLayoutStack::deleteAllChildren() +{ + mPanels.clear(); + LLView::deleteAllChildren(); + + // Not really needed since nothing is left to + // display, but for the sake of consistency + updateFractionalSizes(); + mNeedsLayout = true; +} + void LLLayoutStack::removeChild(LLView* view) { LLLayoutPanel* embedded_panelp = findEmbeddedPanel(dynamic_cast<LLPanel*>(view)); @@ -289,12 +300,14 @@ void LLLayoutStack::removeChild(LLView* view) if (embedded_panelp) { mPanels.erase(std::find(mPanels.begin(), mPanels.end(), embedded_panelp)); - delete embedded_panelp; + LLView::removeChild(view); updateFractionalSizes(); mNeedsLayout = true; } - - LLView::removeChild(view); + else + { + LLView::removeChild(view); + } } BOOL LLLayoutStack::postBuild() |