diff options
author | James Cook <james@lindenlab.com> | 2009-10-23 16:44:23 -0700 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2009-10-23 16:44:23 -0700 |
commit | 07f7247dff19cb7acd320113734773c099b0366d (patch) | |
tree | 7072f301675db427686c06eca48592b89d4db227 /indra/llui/lllayoutstack.cpp | |
parent | 71822edfe824c5f7c742d6d9b8528f8ff541963b (diff) | |
parent | 2b69cb9e9cf5209a8156580b74e6662e4cc4243f (diff) |
merge
Diffstat (limited to 'indra/llui/lllayoutstack.cpp')
-rw-r--r-- | indra/llui/lllayoutstack.cpp | 28 |
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() { |