summaryrefslogtreecommitdiff
path: root/indra/newview/llnetmap.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-05-25 14:22:56 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-05-25 14:22:56 -0700
commit16e3d7ebf56731c5e9ff40b92eff427316c65103 (patch)
tree62552614f1314f4d3bb96ef133b9659bdae89e16 /indra/newview/llnetmap.cpp
parent1bd6061ff57a46293d962adf8ffa5326f87a3566 (diff)
parenta91d10dc1806d1931c7f1361bfcf70df59d982d5 (diff)
Merge
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";
}