diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-07-17 23:17:29 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-07-17 23:18:04 +0300 |
commit | 4c848c8258aa0f8a29aed0bebf9cdbcf32a2c96f (patch) | |
tree | 6b0d38fd8d65d7d2a2689a8b9137e9e90af63986 /indra/llui/lllayoutstack.cpp | |
parent | c37140dd89051317216bbf7a2cb08198c62535e0 (diff) | |
parent | ec4135da63a3f3877222fba4ecb59b15650371fe (diff) |
Merge branch 'main' (DRTVWR-580) into DRTVWR-587-maint-V
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() |