From 35bd8d90bef23fe9b2e35cb14afad5f1c269e84e Mon Sep 17 00:00:00 2001 From: Shyotl Date: Tue, 24 Apr 2012 17:12:13 -0500 Subject: [PATCH] Subpanels created through ui factorymap callbacks which also call LLUICtrlFactory::getInstance()->buildFloater in said callbacks (opposed to using the filename attrib due to that not supporting sub-factorymap callbacks) now get a position fixup determined by parents position attribs for that subpanel after being built. --- indra/llui/llpanel.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index de9c5547f..627f06c80 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -478,6 +478,16 @@ LLView* LLPanel::fromXML(LLXMLNodePtr node, LLView* parent, LLUICtrlFactory *fac { if(!factory->builtPanel(panelp)) panelp->initPanelXML(node, parent, factory); + else + { + LLRect new_rect = panelp->getRect(); + // override rectangle with embedding parameters as provided + panelp->createRect(node, new_rect, parent); + panelp->setOrigin(new_rect.mLeft, new_rect.mBottom); + panelp->setShape(new_rect); + // optionally override follows flags from including nodes + panelp->parseFollowsFlags(node); + } } return panelp;