From 598cd8a30fe31b2af5e9bd23db72101afae45870 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Mon, 10 Sep 2018 17:31:31 +0300 Subject: MAINT-9066 EEP should not be able to delete all Keyframes from Ground Level or Water --- indra/newview/llfloatereditextdaycycle.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloatereditextdaycycle.cpp') diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index f1dbb32016..2295e4f10b 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -842,7 +842,7 @@ void LLFloaterEditExtDayCycle::updateButtons() //mAddFrameButton->setEnabled(can_add); //mDeleteFrameButton->setEnabled(!can_add); mAddFrameButton->setEnabled(true && mCanMod); - mDeleteFrameButton->setEnabled(true && mCanMod); + mDeleteFrameButton->setEnabled(isRemovingFrameAllowed() && mCanMod); } void LLFloaterEditExtDayCycle::updateSlider() @@ -1198,6 +1198,18 @@ void LLFloaterEditExtDayCycle::doApplyCommit() } } +bool LLFloaterEditExtDayCycle::isRemovingFrameAllowed() +{ + if (mCurrentTrack <= LLSettingsDay::TRACK_GROUND_LEVEL) + { + return (mSliderKeyMap.size() > 1); + } + else + { + return (mSliderKeyMap.size() > 0); + } +} + void LLFloaterEditExtDayCycle::onInventoryCreated(LLUUID asset_id, LLUUID inventory_id, LLSD results) { LL_INFOS("ENVDAYEDIT") << "Inventory item " << inventory_id << " has been created with asset " << asset_id << " results are:" << results << LL_ENDL; -- cgit v1.2.3