diff options
author | Alexander Gavriliuk <alexandrgproductengine@lindenlab.com> | 2024-08-28 23:51:29 +0200 |
---|---|---|
committer | Guru <alexandrgproductengine@lindenlab.com> | 2024-08-29 15:40:34 +0200 |
commit | e26261c7f936d697a96b964723498f3e989017d8 (patch) | |
tree | 86c574c4b316b6896c71117039c4b800c8697d1e /indra/newview/llpanelenvironment.cpp | |
parent | e92a06d68114c933599da12d75221504ebac77e0 (diff) |
#2360 Incorrect Day Cycle name in Edit Day Cycle floater after clicking the "Customize" button
Diffstat (limited to 'indra/newview/llpanelenvironment.cpp')
-rw-r--r-- | indra/newview/llpanelenvironment.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp index 2a4323d3e6..c1d8ce50ff 100644 --- a/indra/newview/llpanelenvironment.cpp +++ b/indra/newview/llpanelenvironment.cpp @@ -58,14 +58,6 @@ namespace const std::string FLOATER_DAY_CYCLE_EDIT("env_edit_extdaycycle"); const std::string STRING_REGION_ENV("str_region_env"); const std::string STRING_EMPTY_NAME("str_empty"); - - inline bool ends_with(std::string const & value, std::string const & ending) - { - if (ending.size() > value.size()) - return false; - return std::equal(ending.rbegin(), ending.rend(), value.rbegin()); - } - } //========================================================================= @@ -876,16 +868,16 @@ void LLPanelEnvironmentInfo::onBtnEdit() (LLFloaterEditExtDayCycle::KEY_CANMOD, LLSD::Boolean(true))); dayeditor->openFloater(params); + if (mCurrentEnvironment && mCurrentEnvironment->mDayCycle) { dayeditor->setEditDayCycle(mCurrentEnvironment->mDayCycle); - if (!ends_with(mCurrentEnvironment->mDayCycle->getName(), "(customized)")) - { - dayeditor->setEditName(mCurrentEnvironment->mDayCycle->getName() + "(customized)"); - } + dayeditor->setEditName(mCurrentEnvironment->mDayCycleName); } else + { dayeditor->setEditDefaultDayCycle(); + } } void LLPanelEnvironmentInfo::onBtnSelect() |