summaryrefslogtreecommitdiff
path: root/indra/newview
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
parent8c9d758e3a5de9e11b2e33753e61a5359dbff8de (diff)
MAINT-9066 EEP should not be able to delete all Keyframes from Ground Level or Water
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp14
-rw-r--r--indra/newview/llfloatereditextdaycycle.h2
2 files changed, 15 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;
diff --git a/indra/newview/llfloatereditextdaycycle.h b/indra/newview/llfloatereditextdaycycle.h
index c64ed3ff5a..d808dc60c5 100644
--- a/indra/newview/llfloatereditextdaycycle.h
+++ b/indra/newview/llfloatereditextdaycycle.h
@@ -166,6 +166,8 @@ private:
void setDirtyFlag() { mIsDirty = true; }
virtual void clearDirtyFlag();
+ bool isRemovingFrameAllowed();
+
LLSettingsDay::ptr_t mEditDay; // edited copy
LLSettingsDay::Seconds mDayLength;
U32 mCurrentTrack;