From 8992232e64155588c64b4ab29bad6766bc6c7ff6 Mon Sep 17 00:00:00 2001
From: James Cook <james@lindenlab.com>
Date: Fri, 21 May 2010 16:45:35 -0700
Subject: [PATCH] DEV-50013 Display names in mini-map tooltips

Reviewed with Leyla
---
 indra/newview/llnetmap.cpp | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index a8dee8a24a2..33d03bd890a 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -37,6 +37,7 @@
 
 // Library includes (should move below)
 #include "indra_constants.h"
+#include "llavatarnamecache.h"
 #include "llmath.h"
 #include "llfloaterreg.h"
 #include "llfocusmgr.h"
@@ -555,11 +556,14 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask )
 	
 	// mToolTipMsg = "[AGENT][REGION](Double-click to open Map)"
 	
+	bool have_agent = false;
 	LLStringUtil::format_map_t args;
-	std::string fullname;
-	if(mClosestAgentToCursor.notNull() && gCacheName->getFullName(mClosestAgentToCursor, fullname))
+	LLAvatarName av_name;
+	if(mClosestAgentToCursor.notNull()
+	   && LLAvatarNameCache::get(mClosestAgentToCursor, &av_name))
 	{
-		args["[AGENT]"] = fullname + "\n";
+		args["[AGENT]"] = av_name.getNameAndSLID() + "\n";
+		have_agent = true;
 	}
 	else
 	{
@@ -567,7 +571,7 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask )
 	}
 	
 	LLViewerRegion*	region = LLWorld::getInstance()->getRegionFromPosGlobal( viewPosToGlobal( x, y ) );
-	if( region )
+	if( region && !have_agent)
 	{
 		args["[REGION]"] = region->getName() + "\n";
 	}
-- 
GitLab