summaryrefslogtreecommitdiff
path: root/indra/newview/llagent.cpp
diff options
context:
space:
mode:
authorDave Houlton <euclid@lindenlab.com>2021-02-01 15:59:08 -0700
committerDave Houlton <euclid@lindenlab.com>2021-02-01 15:59:08 -0700
commitf07b332ef0aafd1ecb82b6077309a5292c9cddc1 (patch)
treea76fabd4f71bdbb86b7fe6efb9a6acc0529a429c /indra/newview/llagent.cpp
parentbaa81473149b9d5a6718529c4de08393e8a02b92 (diff)
parent21565a1f3fe1ae737e2f91c58be2c3cb0b5a2fec (diff)
Merge branch 'master' into DV525-merge-6.4.13
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r--indra/newview/llagent.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index e7e9404ded..c65bc0fa50 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -877,6 +877,18 @@ boost::signals2::connection LLAgent::addParcelChangedCallback(parcel_changed_cal
return mParcelChangedSignal.connect(cb);
}
+// static
+void LLAgent::capabilityReceivedCallback(const LLUUID &region_id)
+{
+ LLViewerRegion* region = gAgent.getRegion();
+ if (region && region->getRegionID() == region_id)
+ {
+ region->requestSimulatorFeatures();
+ LLAppViewer::instance()->updateNameLookupUrl();
+ }
+}
+
+
//-----------------------------------------------------------------------------
// setRegion()
//-----------------------------------------------------------------------------
@@ -923,10 +935,11 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
if (regionp->capabilitiesReceived())
{
regionp->requestSimulatorFeatures();
+ LLAppViewer::instance()->updateNameLookupUrl();
}
else
{
- regionp->setCapabilitiesReceivedCallback(boost::bind(&LLViewerRegion::requestSimulatorFeatures, regionp));
+ regionp->setCapabilitiesReceivedCallback(LLAgent::capabilityReceivedCallback);
}
}
@@ -945,6 +958,15 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
// Update all of the regions.
LLWorld::getInstance()->updateAgentOffset(mAgentOriginGlobal);
+
+ if (regionp->capabilitiesReceived())
+ {
+ LLAppViewer::instance()->updateNameLookupUrl();
+ }
+ else
+ {
+ regionp->setCapabilitiesReceivedCallback([](const LLUUID &region_id) {LLAppViewer::instance()->updateNameLookupUrl(); });
+ }
}
// Pass new region along to metrics components that care about this level of detail.