From 3a5ef5bd6fa962c2b73baaab7be6099b0caf5665 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 13 Aug 2010 17:33:25 -0700 Subject: fixed nametag reverting to legacy name ever 3 minutes --- indra/newview/lltoolpie.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'indra') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 535f41a3aa..809d39885d 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -879,17 +879,20 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l full_name = LLTrans::getString("TooltipPerson"); } } - LLAvatarName av_name; - if (LLAvatarNameCache::useDisplayNames() - && LLAvatarNameCache::get(hover_object->getID(), &av_name)) + if (LLAvatarNameCache::useDisplayNames()) { - final_name = av_name.mDisplayName + " (" + av_name.mUsername + ")"; - } - else - { - final_name = full_name; + LLAvatarName av_name; + LLAvatarNameCache::get(hover_object->getID(), &av_name); + if (!av_name.mDisplayName.empty()) + { + final_name = av_name.mDisplayName + " (" + av_name.mUsername + ")"; + } + else + { + final_name = full_name; + } } - + // *HACK: We may select this object, so pretend it was clicked mPick = mHoverPick; LLInspector::Params p; -- cgit v1.2.3