summaryrefslogtreecommitdiff
path: root/indra/newview/llnetmap.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-05-21 16:45:35 -0700
committerJames Cook <james@lindenlab.com>2010-05-21 16:45:35 -0700
commit8992232e64155588c64b4ab29bad6766bc6c7ff6 (patch)
tree6b367f5805954b47f2eb8e8c908396ffe3fcd542 /indra/newview/llnetmap.cpp
parent22cef83f9a1008b341c905b0e9840fa37c4930fa (diff)
DEV-50013 Display names in mini-map tooltips
Reviewed with Leyla
Diffstat (limited to 'indra/newview/llnetmap.cpp')
-rw-r--r--indra/newview/llnetmap.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index a8dee8a24a..33d03bd890 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";
}