diff options
| author | richard <none@none> | 2009-10-26 14:28:09 -0700 |
|---|---|---|
| committer | richard <none@none> | 2009-10-26 14:28:09 -0700 |
| commit | f2a48ed7f9c67ecc15b9174dc08069da25b33380 (patch) | |
| tree | 265af2b431939a8ff88db532b7de3b3396437c5b /indra/llui/lllayoutstack.cpp | |
| parent | 977dd845346cae05eab2249945f083df47552c8f (diff) | |
| parent | e84ff39e4c7c5b028a6b8b4f6dc5d37c525eb1c4 (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() { |
