diff options
author | Rider Linden <rider@lindenlab.com> | 2018-12-06 17:44:35 +0000 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2018-12-06 17:44:35 +0000 |
commit | cf7658ca3b7731e83ebf424b9c4b7a4c36ce328f (patch) | |
tree | 7e338078081315a062a055cb2ef22e9a7f243f38 | |
parent | 5345c1d00f96be8ce3d9c54e27832177d06ed79c (diff) | |
parent | ff334b6829f225cbd398188abbbf1ab6df6c613d (diff) |
Merged in maxim_productengine/viewer-eep (pull request #209)
SL-10165 Load Frame button on Day Cycle editor is not working when a frame is selected
-rw-r--r-- | indra/newview/llfloatereditextdaycycle.cpp | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index d02aa89780..f9b25c1977 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -430,7 +430,6 @@ void LLFloaterEditExtDayCycle::refresh() mFlyoutControl->setMenuItemEnabled(ACTION_APPLY_REGION, canApplyRegion() && show_apply); mImportButton->setEnabled(mCanMod); - mLoadFrame->setEnabled(mCanMod); LLFloater::refresh(); } @@ -1032,6 +1031,7 @@ void LLFloaterEditExtDayCycle::updateButtons() //mDeleteFrameButton->setEnabled(!can_add); mAddFrameButton->setEnabled(isAddingFrameAllowed() && mCanMod); mDeleteFrameButton->setEnabled(isRemovingFrameAllowed() && mCanMod); + mLoadFrame->setEnabled(!mIsPlaying && mCanMod); } void LLFloaterEditExtDayCycle::updateSlider() @@ -1648,20 +1648,35 @@ void LLFloaterEditExtDayCycle::onAssetLoadedForFrame(LLUUID item_id, LLUUID asse { std::function<void()> cb = [this, settings, frame, track]() { - if ((mEditDay->getSettingsNearKeyframe(frame, mCurrentTrack, LLSettingsDay::DEFAULT_FRAME_SLOP_FACTOR)).second) + if (mFramesSlider->getCurSlider().empty()) { - LL_WARNS("ENVDAYEDIT") << "Attempt to add new frame too close to existing frame." << LL_ENDL; - return; + if ((mEditDay->getSettingsNearKeyframe(frame, mCurrentTrack, LLSettingsDay::DEFAULT_FRAME_SLOP_FACTOR)).second) + { + LL_WARNS("ENVDAYEDIT") << "Attempt to add new frame too close to existing frame." << LL_ENDL; + return; + } + if (!mFramesSlider->canAddSliders()) + { + LL_WARNS("ENVDAYEDIT") << "Attempt to add new frame when slider is full." << LL_ENDL; + return; + } + mEditDay->setSettingsAtKeyframe(settings, frame, track); + addSliderFrame(frame, settings, false); + reblendSettings(); + synchronizeTabs(); } - if (!mFramesSlider->canAddSliders()) + else { - LL_WARNS("ENVDAYEDIT") << "Attempt to add new frame when slider is full." << LL_ENDL; - return; + if (mCurrentTrack == LLSettingsDay::TRACK_WATER) + { + mEditDay->setWaterAtKeyframe(std::static_pointer_cast<LLSettingsWater>(settings), frame); + } + else + { + mEditDay->setSkyAtKeyframe(std::static_pointer_cast<LLSettingsSky>(settings), frame, track); + } + updateTabs(); } - mEditDay->setSettingsAtKeyframe(settings, frame, track); - addSliderFrame(frame, settings, false); - reblendSettings(); - synchronizeTabs(); }; if (!settings || status) |