summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2018-12-06 17:41:05 +0200
committermaxim_productengine <mnikolenko@productengine.com>2018-12-06 17:41:05 +0200
commitff334b6829f225cbd398188abbbf1ab6df6c613d (patch)
tree0ce7fd116f4ff35a283b2fa8acd637d84c1ec84e
parent031dabede84d3772bf857b7aca20b5378b99d06c (diff)
SL-10165 Load Frame button on Day Cycle editor is not working when a frame is selected
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp37
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)