meow-7.2.2
Graham Linden 2018-10-04 22:14:36 +01:00
commit 481a66da28
3 changed files with 40 additions and 29 deletions

View File

@ -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&notif, 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&notif, 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();

View File

@ -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

View File

@ -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();
}
}
}