summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-09-27 10:14:09 -0700
committerRider Linden <rider@lindenlab.com>2018-09-27 10:14:09 -0700
commit7597e4ecfd82ac948a003d6ed880ea7a9aecff46 (patch)
tree9f8978db9e82a4752f999e894c752168d1b4252f /indra/newview
parent337beb56f962c4574b500af20538d37d099c8cf3 (diff)
parent3cfeff4bb357542d7eba7368a83d606d5393f7c2 (diff)
Merge
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp14
-rw-r--r--indra/newview/llfloaterfixedenvironment.cpp14
2 files changed, 2 insertions, 26 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index b9e9bf768e..241c3ab59d 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -1423,19 +1423,7 @@ bool LLFloaterEditExtDayCycle::canApplyRegion() const
bool LLFloaterEditExtDayCycle::canApplyParcel() const
{
- LLParcelSelectionHandle handle(LLViewerParcelMgr::instance().getParcelSelection());
- LLParcel *parcel(nullptr);
-
- if (handle)
- parcel = handle->getParcel();
- if (!parcel)
- parcel = LLViewerParcelMgr::instance().getAgentParcel();
-
- if (!parcel)
- return false;
-
- return parcel->allowTerraformBy(gAgent.getID()) &&
- LLEnvironment::instance().isExtendedEnvironmentEnabled();
+ return LLEnvironment::instance().canAgentUpdateParcelEnvironment();
}
void LLFloaterEditExtDayCycle::startPlay()
diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp
index b9ea044a06..71d3ef6405 100644
--- a/indra/newview/llfloaterfixedenvironment.cpp
+++ b/indra/newview/llfloaterfixedenvironment.cpp
@@ -571,19 +571,7 @@ bool LLFloaterFixedEnvironment::canApplyRegion() const
bool LLFloaterFixedEnvironment::canApplyParcel() const
{
- LLParcelSelectionHandle handle(LLViewerParcelMgr::instance().getParcelSelection());
- LLParcel *parcel(nullptr);
-
- if (handle)
- parcel = handle->getParcel();
- if (!parcel)
- parcel = LLViewerParcelMgr::instance().getAgentParcel();
-
- if (!parcel)
- return false;
-
- return parcel->allowModifyBy(gAgent.getID(), gAgent.getGroupID()) &&
- LLEnvironment::instance().isExtendedEnvironmentEnabled();
+ return LLEnvironment::instance().canAgentUpdateParcelEnvironment();
}
//=========================================================================