From fcea61df76ce69b438d26037df4bafc3380f129d Mon Sep 17 00:00:00 2001
From: Yuri Chebotarev <ychebotarev@productengine.com>
Date: Mon, 17 May 2010 18:39:11 +0300
Subject: [PATCH] EXT-7266 FIX change default icon id tofrom object icon to id
 that comes with message

Reviwed by Igor Borovkov at https://codereview.productengine.com/secondlife/r/371/

--HG--
branch : product-engine
---
 indra/newview/llchatitemscontainerctrl.cpp | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index 5b6a99e793c..35a244c4616 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -326,12 +326,14 @@ void LLNearbyChatToastPanel::draw()
 		if(icon)
 		{
 			icon->setDrawTooltip(mSourceType == CHAT_SOURCE_AGENT);
-			if(mSourceType == CHAT_SOURCE_AGENT)
-				icon->setValue(mFromID);
+			if(mSourceType == CHAT_SOURCE_OBJECT)
+				icon->setValue(LLSD("OBJECT_Icon"));
 			else if(mSourceType == CHAT_SOURCE_SYSTEM)
 				icon->setValue(LLSD("SL_Logo"));
-			else
-				icon->setValue(LLSD("OBJECT_Icon"));
+			else if(mSourceType == CHAT_SOURCE_AGENT)
+				icon->setValue(mFromID);
+			else if(!mFromID.isNull())
+				icon->setValue(mFromID);
 		}
 		mIsDirty = false;
 	}
-- 
GitLab