summaryrefslogtreecommitdiff
path: root/indra/llui/lllayoutstack.cpp
diff options
context:
space:
mode:
authorskolb <none@none>2009-10-23 15:34:15 -0700
committerskolb <none@none>2009-10-23 15:34:15 -0700
commit2b69cb9e9cf5209a8156580b74e6662e4cc4243f (patch)
treef38805b6ca5b60e8c0130259865dc610eaee7a0b /indra/llui/lllayoutstack.cpp
parent913786a62b2b8d8e6d9c483ea805a21e694fd818 (diff)
parent4ddaa866dde7a92e56617a32464e0667de3759ef (diff)
Merged change to auto play pref (DEV-41787)
Diffstat (limited to 'indra/llui/lllayoutstack.cpp')
-rw-r--r--indra/llui/lllayoutstack.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index 24fd380bb1..bac5491943 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -401,6 +401,16 @@ void LLLayoutStack::collapsePanel(LLPanel* panel, BOOL collapsed)
panel_container->mCollapsed = collapsed;
}
+void LLLayoutStack::updatePanelAutoResize(const std::string& panel_name, BOOL auto_resize)
+{
+ LayoutPanel* panel = findEmbeddedPanelByName(panel_name);
+
+ if (panel)
+ {
+ panel->mAutoResize = auto_resize;
+ }
+}
+
void LLLayoutStack::updateLayout(BOOL force_resize)
{
static LLUICachedControl<S32> resize_bar_overlap ("UIResizeBarOverlap", 0);
@@ -713,6 +723,24 @@ LLLayoutStack::LayoutPanel* LLLayoutStack::findEmbeddedPanel(LLPanel* panelp) co
return NULL;
}
+LLLayoutStack::LayoutPanel* LLLayoutStack::findEmbeddedPanelByName(const std::string& name) const
+{
+ LayoutPanel* result = NULL;
+
+ for (e_panel_list_t::const_iterator panel_it = mPanels.begin(); panel_it != mPanels.end(); ++panel_it)
+ {
+ LayoutPanel* p = *panel_it;
+
+ if (p->mPanel->getName() == name)
+ {
+ result = p;
+ break;
+ }
+ }
+
+ return result;
+}
+
// Compute sum of min_width or min_height of children
void LLLayoutStack::calcMinExtents()
{