summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterregioninfo.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-12-06 17:43:51 +0000
committerRider Linden <rider@lindenlab.com>2018-12-06 17:43:51 +0000
commit5345c1d00f96be8ce3d9c54e27832177d06ed79c (patch)
tree34a9dc4965ef75d0dd2f84a2cf24382a4a7513a6 /indra/newview/llfloaterregioninfo.cpp
parent7650fb53c8f2735c7cdf9178cd5ac1c6902cec8a (diff)
parent76071d4fe8f2b88e33d0393fe00dc2ce88f71935 (diff)
Merged in andreykproductengine/maint-eep (pull request #208)
SL-10091 EEP Filter out dupplicate refreshes and callbacks
Diffstat (limited to 'indra/newview/llfloaterregioninfo.cpp')
-rw-r--r--indra/newview/llfloaterregioninfo.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 671f5aca9d..d7d114ca41 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -300,8 +300,7 @@ void LLFloaterRegionInfo::onOpen(const LLSD& key)
disableTabCtrls();
return;
}
- refreshFromRegion(gAgent.getRegion());
- requestRegionInfo();
+ requestRegionInfo(); // will cause refreshFromRegion()
requestMeshRezInfo();
}
@@ -484,6 +483,8 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
panel->setCtrlsEnabled(allow_modify);
+ // Note: region info also causes LLRegionInfoModel::instance().update(msg); -> requestRegion(); -> changed message
+ // we need to know env version here and in update(msg) to know when to request and when not to, when to filter 'changed'
floater->refreshFromRegion( gAgent.getRegion() );
}
@@ -3410,7 +3411,10 @@ void LLPanelRegionEnvironment::refresh()
{
if (!mCurrentEnvironment)
{
- refreshFromSource();
+ if (mCurEnvVersion <= INVALID_PARCEL_ENVIRONMENT_VERSION)
+ {
+ refreshFromSource(); // will immediately set mCurEnvVersion
+ } // else - already requesting
return;
}
@@ -3426,15 +3430,17 @@ bool LLPanelRegionEnvironment::refreshFromRegion(LLViewerRegion* region)
{
setNoSelection(true);
setControlsEnabled(false);
+ mCurEnvVersion = INVALID_PARCEL_ENVIRONMENT_VERSION;
}
setNoSelection(false);
if (gAgent.getRegion()->getRegionID() != region->getRegionID())
{
setCrossRegion(true);
+ mCurEnvVersion = INVALID_PARCEL_ENVIRONMENT_VERSION;
}
setCrossRegion(false);
-
+
refreshFromSource();
return true;
}
@@ -3448,9 +3454,15 @@ void LLPanelRegionEnvironment::refreshFromEstate()
void LLPanelRegionEnvironment::refreshFromSource()
{
+ LL_DEBUGS("ENVIRONMENT") << "Requesting environment for region, known version " << mCurEnvVersion << LL_ENDL;
LLHandle<LLPanel> that_h = getHandle();
- mCurEnvVersion = INVALID_PARCEL_ENVIRONMENT_VERSION;
+ if (mCurEnvVersion < UNSET_PARCEL_ENVIRONMENT_VERSION)
+ {
+ // to mark as requesting
+ mCurEnvVersion = UNSET_PARCEL_ENVIRONMENT_VERSION;
+ }
+
LLEnvironment::instance().requestRegion(
[that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { _onEnvironmentReceived(that_h, parcel_id, envifo); });