From 3cfeff4bb357542d7eba7368a83d606d5393f7c2 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 27 Sep 2018 19:09:21 +0300 Subject: SL-9755 EEP Cannot apply a new Sky setting to the parcel. --- indra/newview/llfloatereditextdaycycle.cpp | 14 +------------- indra/newview/llfloaterfixedenvironment.cpp | 14 +------------- 2 files changed, 2 insertions(+), 26 deletions(-) (limited to 'indra/newview') 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(); } //========================================================================= -- cgit v1.2.3