diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloatereditextdaycycle.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llfloaterfixedenvironment.cpp | 8 |
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)) { |