summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2018-10-01 16:46:16 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2018-10-01 16:46:16 +0300
commit100fd88d2c6e29026b132b13bdb82278e3cd72c7 (patch)
tree667989b6c3517f79f90eb141ad98c99f99cd9312
parentee2720d0a1d9153547a6012d6b31c6bfff4e37a7 (diff)
SL-9755 EEP Cannot apply a new Sky setting to the parcel.
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp8
-rw-r--r--indra/newview/llfloaterfixedenvironment.cpp8
2 files changed, 2 insertions, 14 deletions
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))
{