summaryrefslogtreecommitdiff
path: root/indra/llui/lllayoutstack.cpp
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2023-07-18 12:18:35 -0500
committerRunitaiLinden <davep@lindenlab.com>2023-07-18 12:18:35 -0500
commit5797711cbdb553b39e6bc6ad7d9250e3208e5633 (patch)
tree5071e15e3240c3e39fe42a26f4c45bd63ccb381a /indra/llui/lllayoutstack.cpp
parenta0089c432ac9008f5d2f7ef2a332afa10c5a2615 (diff)
parentf9f5b538b21ae57f34009b36d4831d2a7000c20c (diff)
Merge branch 'DRTVWR-559' of github.com:secondlife/viewer into DRTVWR-559
Diffstat (limited to 'indra/llui/lllayoutstack.cpp')
-rw-r--r--indra/llui/lllayoutstack.cpp19
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()