diff options
author | James Cook <james@lindenlab.com> | 2010-04-27 13:54:40 -0700 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-04-27 13:54:40 -0700 |
commit | 56f5a6909d8a665531e3f6ede380cad57e313728 (patch) | |
tree | ff8ec9b0441a800336030f207e41fc2bc703a7a3 /indra/newview/llappviewer.cpp | |
parent | 6d239f7cfae65e6c8354d9f94061e81e82112a44 (diff) |
Menu item to disable display names for testing works again
Start up cache in not-running state on viewer. Set cache running when
idle() is called. Explicitly refresh name tags when toggled.
Reviewed with Simon
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r-- | indra/newview/llappviewer.cpp | 11 |
1 files changed, 2 insertions, 9 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(); } |