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