From caa468a5f184a1c2dd2cd1f2c4a7aafc5acf05d0 Mon Sep 17 00:00:00 2001
From: Rick Pasetto <rick@lindenlab.com>
Date: Tue, 10 Nov 2009 12:58:10 -0800
Subject: [PATCH] fix for gcc

---
 indra/llui/lluictrlfactory.cpp | 6 ++++++
 indra/llui/lluictrlfactory.h   | 7 ++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp
index c3c0daed0f4..8ab015f2bb8 100644
--- a/indra/llui/lluictrlfactory.cpp
+++ b/indra/llui/lluictrlfactory.cpp
@@ -449,3 +449,9 @@ const std::string* LLUICtrlFactory::getWidgetTag(const std::type_info* widget_ty
 {
 	return LLWidgetNameRegistry::instance().getValue(widget_type);
 }
+
+// static
+void LLUICtrlFactory::connect(LLView* parent, LLView* child)
+{
+	parent->addChild(child);
+}
\ No newline at end of file
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index 0ccd3047f6c..8a9c9e23c1d 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -188,10 +188,15 @@ class LLUICtrlFactory : public LLSingleton<LLUICtrlFactory>
 		T* widget = new T(params);
 		widget->initFromParams(params);
 		if (parent)
-			parent->addChild(widget);
+		{
+			connect(parent, widget);
+		}
 		return widget;
 	}
 
+	// fix for gcc template instantiation annoyance
+	static void connect(LLView* parent, LLView* child);
+	
 	LLView* createFromXML(LLXMLNodePtr node, LLView* parent, const std::string& filename, const widget_registry_t&, LLXMLNodePtr output_node );
 
 	template<typename T>
-- 
GitLab