diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/lltoolpie.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
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; |