summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelenvironment.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2019-01-02 17:10:15 -0800
committerRider Linden <rider@lindenlab.com>2019-01-02 17:10:15 -0800
commitd607d81dba25dfe7dd1ecdf123af656ca939924f (patch)
tree94f45fac6cd13c4677e20be0ada48a0e7985740a /indra/newview/llpanelenvironment.cpp
parent5fe626afabd2857980e8011ceb6081f9e9f108c7 (diff)
SL-10279: Temp fix for stale estate info when editing parcel environment.
Diffstat (limited to 'indra/newview/llpanelenvironment.cpp')
-rw-r--r--indra/newview/llpanelenvironment.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index 79e3d61014..b4007cfdf0 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -130,7 +130,7 @@ LLPanelEnvironmentInfo::LLPanelEnvironmentInfo():
mCurEnvVersion(INVALID_PARCEL_ENVIRONMENT_VERSION),
mSettingsFloater(),
mEditFloater(),
- mAllowOverride(false)
+ mAllowOverride(true)
{
}
@@ -283,9 +283,21 @@ void LLPanelEnvironmentInfo::refresh()
void LLPanelEnvironmentInfo::refreshFromEstate()
{
+ /*TODO: Bug!! estate_info seems stale if regain floater has not been opened.*/
const LLEstateInfoModel& estate_info = LLEstateInfoModel::instance();
- mAllowOverride = estate_info.getAllowEnvironmentOverride();
+ if (isRegion())
+ { // this should always work... but estate_info gives back false when it shouldn't for parcels
+ bool oldAO = mAllowOverride;
+ mAllowOverride = estate_info.getAllowEnvironmentOverride();
+ if (oldAO != mAllowOverride)
+ refresh();
+ }
+ else
+ {
+ // Get rid of this when I solve the above.
+ mAllowOverride = true;
+ }
}
std::string LLPanelEnvironmentInfo::getInventoryNameForAssetId(LLUUID asset_id)