summaryrefslogtreecommitdiff
path: root/indra/newview/llnetmap.cpp
diff options
context:
space:
mode:
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..67b238ad58 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.getCompleteName() + "\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";
}