summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();
}
//=========================================================================