diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llappviewer.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 2 |
3 files changed, 7 insertions, 10 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 3b236676f1..5df6776fa7 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3916,6 +3916,7 @@ void LLAppViewer::idleNameCache() // granted to neighbor regions before the main agent gets there. Can't // do it in the move-into-region code because cap not guaranteed to be // granted yet, for example on teleport. + bool had_capability = LLAvatarNameCache::hasNameLookupURL(); std::string name_lookup_url; name_lookup_url.reserve(128); // avoid a memory allocation below name_lookup_url = region->getCapability("GetDisplayNames"); @@ -3941,19 +3942,11 @@ void LLAppViewer::idleNameCache() } // Error recovery - did we change state? - if (LLAvatarNameCache::useDisplayNames() && !have_capability) + if (had_capability != have_capability) { - // ...we just lost the capability, turn names off - LLAvatarNameCache::setUseDisplayNames(false); // name tags are persistant on screen, so make sure they refresh LLVOAvatar::invalidateNameTags(); } - else if (!LLAvatarNameCache::useDisplayNames() && have_capability) - { - // ...we just gained the capability, turn names on - LLAvatarNameCache::setUseDisplayNames(true); - LLVOAvatar::invalidateNameTags(); - } LLAvatarNameCache::idle(); } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 7531853008..2baaf0f58f 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2771,7 +2771,9 @@ void LLStartUp::initNameCache() // Load stored cache if possible LLAppViewer::instance()->loadNameCache(); - LLAvatarNameCache::initClass(); + // Start cache in not-running state until we figure out if we have + // capabilities for display name lookup + LLAvatarNameCache::initClass(false); } void LLStartUp::cleanupNameCache() diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index adf71878f5..9fe16b5253 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7597,6 +7597,8 @@ void toggle_display_names() { bool use = LLAvatarNameCache::useDisplayNames(); LLAvatarNameCache::setUseDisplayNames(!use); + + LLVOAvatar::invalidateNameTags(); } void show_navbar_context_menu(LLView* ctrl, S32 x, S32 y) |