summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatereditextdaycycle.cpp
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2018-09-10 17:31:31 +0300
committermaxim_productengine <mnikolenko@productengine.com>2018-09-10 17:31:31 +0300
commit598cd8a30fe31b2af5e9bd23db72101afae45870 (patch)
tree1ed01959e7602816cfdcf54d6e27f41b46c4187b /indra/newview/llfloatereditextdaycycle.cpp
parent8c9d758e3a5de9e11b2e33753e61a5359dbff8de (diff)
MAINT-9066 EEP should not be able to delete all Keyframes from Ground Level or Water
Diffstat (limited to 'indra/newview/llfloatereditextdaycycle.cpp')
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp14
1 files changed, 13 insertions, 1 deletions
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;