summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-10-03 16:35:40 +0000
committerRider Linden <rider@lindenlab.com>2018-10-03 16:35:40 +0000
commit737a1552edc3d2947caf4f10c5cb25b0bc214833 (patch)
treeb530268e7651bebe2da9e515360d526db35d2a78 /indra/newview
parent20e78bb88ebe0a5416f3fb272afe9455aa756869 (diff)
parent9b1f7bd9d1bfe64ea1243609471e80136d96fc67 (diff)
Merged in andreykproductengine/maint-eep2 (pull request #127)
SL-9789 [EEP] Viewer crashes after reloading the same frame Approved-by: Maxim Nikolenko <maximnproductengine@lindenlab.com>
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp53
1 files changed, 26 insertions, 27 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&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();