diff options
author | Graham Linden <graham@lindenlab.com> | 2018-10-04 22:14:36 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-10-04 22:14:36 +0100 |
commit | 481a66da281040c6e42d6acf3ffa00bc46f67a1c (patch) | |
tree | 681875a75c80e9de5c9667bc6acbf9fe3fd93983 | |
parent | 5b4dba2cea2d58d18380482d9b54eebcc2dda1af (diff) | |
parent | 8acb87aaf32e6f27d2f8caba6178cdd7a80c2086 (diff) |
Merge
-rw-r--r-- | indra/newview/llfloatereditextdaycycle.cpp | 53 | ||||
-rw-r--r-- | indra/newview/lllegacyatmospherics.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llpanelenvironment.cpp | 5 |
3 files changed, 40 insertions, 29 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index f01159f07c..1d209fe230 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -1102,13 +1102,6 @@ void LLFloaterEditExtDayCycle::onAssetLoaded(LLUUID asset_id, LLSettingsBase::pt } mExpectingAssetId.setNull(); - if ((mInventoryItem && mInventoryItem->getAssetUUID() != asset_id) - || (!mInventoryItem && LLSettingsDay::GetDefaultAssetId() != asset_id)) - { - LL_WARNS("ENVDAYEDIT") << "Discarding obsolete asset callback" << LL_ENDL; - return; - } - if (!settings || status) { LLSD args; @@ -1537,6 +1530,16 @@ void LLFloaterEditExtDayCycle::onAssetLoadedForFrame(LLUUID asset_id, LLSettings { std::function<void()> cb = [this, settings, frame, track]() { + 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); reblendSettings(); synchronizeTabs(); @@ -1556,30 +1559,26 @@ void LLFloaterEditExtDayCycle::onAssetLoadedForFrame(LLUUID asset_id, LLSettings inv_item = picker->findItem(asset_id, false, false); } - if (inv_item) + if (inv_item + && mInventoryItem + && mInventoryItem->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()) + && !inv_item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) { - if (mInventoryItem->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) + LLSD args; + + // create and show confirmation textbox + LLNotificationsUtil::add("SettingsMakeNoTrans", args, LLSD(), + [this, cb](const LLSD¬if, const LLSD&resp) { - if (!inv_item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) + S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp); + if (opt == 0) { - LLSD args; - - // create and show confirmation textbox - LLNotificationsUtil::add("SettingsMakeNoTrans", args, LLSD(), - [this, cb](const LLSD¬if, const LLSD&resp) - { - S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp); - if (opt == 0) - { - mMakeNoTrans = true; - mEditDay->setFlag(LLSettingsBase::FLAG_NOTRANS); - cb(); - } - }); - return; + mMakeNoTrans = true; + mEditDay->setFlag(LLSettingsBase::FLAG_NOTRANS); + cb(); } - } - + }); + return; } cb(); diff --git a/indra/newview/lllegacyatmospherics.cpp b/indra/newview/lllegacyatmospherics.cpp index 04623c4452..0c4e5b48e8 100644 --- a/indra/newview/lllegacyatmospherics.cpp +++ b/indra/newview/lllegacyatmospherics.cpp @@ -333,8 +333,17 @@ void LLAtmospherics::calcSkyColorWLVert(LLVector3 & Pn, AtmosphericsVars& vars) // temp2.x is 0 at the sun and increases away from sun temp2.mV[0] = llmax(temp2.mV[0], .001f); // Set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot) - temp2.mV[0] *= glow.mV[0]; + + if (glow.mV[0] > 0) // don't pow(zero,negative value), glow from 0 to 2 + { // Higher glow.x gives dimmer glow (because next step is 1 / "angle") + temp2.mV[0] *= glow.mV[0]; + } + else + { + temp2.mV[0] = F32_MIN; + } + temp2.mV[0] = pow(temp2.mV[0], glow.mV[2]); // glow.z should be negative, so we're doing a sort of (1 / "angle") function diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp index ecd67ff8af..4ab09e7118 100644 --- a/indra/newview/llpanelenvironment.cpp +++ b/indra/newview/llpanelenvironment.cpp @@ -170,7 +170,7 @@ void LLPanelEnvironmentInfo::onVisibilityChange(BOOL new_visibility) } gIdleCallbacks.deleteFunction(onIdlePlay, this); - LLFloaterEditExtDayCycle *dayeditor = getEditFloater(); + LLFloaterEditExtDayCycle *dayeditor = getEditFloater(false); if (mCommitConnection.connected()) mCommitConnection.disconnect(); @@ -179,7 +179,10 @@ void LLPanelEnvironmentInfo::onVisibilityChange(BOOL new_visibility) if (dayeditor->isDirty()) dayeditor->refresh(); else + { dayeditor->closeFloater(); + mEditFloater.markDead(); + } } } |