From fdc848cf72f755b3ce924e12625ec9923495f9bc Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Tue, 20 Oct 2009 22:05:00 +0000 Subject: removed unnecessary static variable instantiations to improve compile times moved a bunch of template class statics to cpp files also added filename parameter to LLXUIParser::readXUI for better debugging of XUI errors reviewed by James --- indra/llui/lllayoutstack.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/lllayoutstack.cpp') diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 5eade72b61..24fd380bb1 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -229,7 +229,7 @@ static void get_attribute_bool_and_write(LLXMLNodePtr node, LLView* LLLayoutStack::fromXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node) { LLLayoutStack::Params p(LLUICtrlFactory::getDefaultParams()); - LLXUIParser::instance().readXUI(node, p); + LLXUIParser::instance().readXUI(node, p, LLUICtrlFactory::getInstance()->getCurFileName()); // Export must happen before setupParams() mungles rectangles and before // this item gets added to parent (otherwise screws up last_child_rect -- cgit v1.2.3 From b43771cad585cb9820941eb1b24b67390eaa9435 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Fri, 23 Oct 2009 17:20:45 +0000 Subject: Merging revisions 2156-2183 of https://svn.aws.productengine.com/secondlife/pe/stable-2 into P:\svn\viewer-2.0.0-3, respecting ancestry * Bugs: EXT-1590 EXT-1694 EXT-1660 EXT-1646 EXT-1694 EXT-1316 EXT-1775 EXT-1798 EXT-1799 EXT-1117 EXT-1571 EXT-1572 * Dev: EXT-1757 EXT-991 EXT-1758 EXT-1770 EXT-1192 EXT-1613 EXT-1611 EXT-1256 EXT-1758 EXT-747 --- indra/llui/lllayoutstack.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'indra/llui/lllayoutstack.cpp') 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 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() { -- cgit v1.2.3