From 100fd88d2c6e29026b132b13bdb82278e3cd72c7 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 1 Oct 2018 16:46:16 +0300 Subject: SL-9755 EEP Cannot apply a new Sky setting to the parcel. --- indra/newview/llfloatereditextdaycycle.cpp | 8 +------- indra/newview/llfloaterfixedenvironment.cpp | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index 241c3ab59d..f01159f07c 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -1281,13 +1281,7 @@ void LLFloaterEditExtDayCycle::doApplyEnvironment(const std::string &where, cons } else if (where == ACTION_APPLY_PARCEL) { - LLParcelSelectionHandle handle(LLViewerParcelMgr::instance().getParcelSelection()); - LLParcel *parcel(nullptr); - - if (handle) - parcel = handle->getParcel(); - if (!parcel || (parcel->getLocalID() == INVALID_PARCEL_ID)) - parcel = LLViewerParcelMgr::instance().getAgentParcel(); + LLParcel *parcel(LLViewerParcelMgr::instance().getAgentOrSelectedParcel()); if ((!parcel) || (parcel->getLocalID() == INVALID_PARCEL_ID)) { diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp index 71d3ef6405..216556cf89 100644 --- a/indra/newview/llfloaterfixedenvironment.cpp +++ b/indra/newview/llfloaterfixedenvironment.cpp @@ -428,13 +428,7 @@ void LLFloaterFixedEnvironment::doApplyEnvironment(const std::string &where) } else if (where == ACTION_APPLY_PARCEL) { - LLParcelSelectionHandle handle(LLViewerParcelMgr::instance().getParcelSelection()); - LLParcel *parcel(nullptr); - - if (handle) - parcel = handle->getParcel(); - if (!parcel) - parcel = LLViewerParcelMgr::instance().getAgentParcel(); + LLParcel *parcel(LLViewerParcelMgr::instance().getAgentOrSelectedParcel()); if ((!parcel) || (parcel->getLocalID() == INVALID_PARCEL_ID)) { -- cgit v1.2.3