From 26d81d3d6cc56f8f8df9f33ff27229671fb8a2db Mon Sep 17 00:00:00 2001
From: Mnikolenko Productengine <mnikolenko@productengine.com>
Date: Wed, 15 Mar 2017 16:01:39 +0200
Subject: [PATCH] MAINT-7199 Field "From" on the tab "Send via E-mail" should
 be initialized to the agent full name

---
 indra/newview/llpanelsnapshotpostcard.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp
index ebf9153da9d..3d18e837afc 100644
--- a/indra/newview/llpanelsnapshotpostcard.cpp
+++ b/indra/newview/llpanelsnapshotpostcard.cpp
@@ -106,6 +106,14 @@ BOOL LLPanelSnapshotPostcard::postBuild()
 // virtual
 void LLPanelSnapshotPostcard::onOpen(const LLSD& key)
 {
+	LLUICtrl* name_form = getChild<LLUICtrl>("name_form");
+	if (name_form && name_form->getValue().asString().empty())
+	{
+		std::string name_string;
+		LLAgentUI::buildFullname(name_string);
+		getChild<LLUICtrl>("name_form")->setValue(LLSD(name_string));
+	}
+
 	LLPanelSnapshot::onOpen(key);
 }
 
-- 
GitLab