summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-01-28 20:09:35 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-01-28 20:09:35 +0200
commit54dc80a7091ad2225d8dee610eb50f190a742513 (patch)
treec6b20cd49a513c228ea9172b5fa39dc580d8cc49 /indra
parent11ddd765ef221aead78df7b16aa145b5312249b4 (diff)
SL-1932 No transfer check should work for parcel and region environments
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp43
1 files changed, 27 insertions, 16 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index 51bbc9fb90..42c73d5668 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -2007,26 +2007,37 @@ void LLFloaterEditExtDayCycle::onAssetLoadedForInsertion(LLUUID item_id, LLUUID
LLInventoryItem *inv_item = gInventory.getItem(item_id);
- if (inv_item
- && mInventoryItem
- && mInventoryItem->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())
- && !inv_item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
+ if (inv_item && !inv_item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
{
- LLSD args;
+ // Need to check if item is already no-transfer, otherwise make it no-transfer
+ bool no_transfer = false;
+ if (mInventoryItem)
+ {
+ no_transfer = mInventoryItem->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID());
+ }
+ else
+ {
+ no_transfer = mEditDay->getFlag(LLSettingsBase::FLAG_NOTRANS);
+ }
- // create and show confirmation textbox
- LLNotificationsUtil::add("SettingsMakeNoTrans", args, LLSD(),
- [this, cb](const LLSD&notif, const LLSD&resp)
+ if (!no_transfer)
{
- 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)
{
- mMakeNoTrans = true;
- mEditDay->setFlag(LLSettingsBase::FLAG_NOTRANS);
- cb();
- }
- });
- return;
+ S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp);
+ if (opt == 0)
+ {
+ mMakeNoTrans = true;
+ mEditDay->setFlag(LLSettingsBase::FLAG_NOTRANS);
+ cb();
+ }
+ });
+ return;
+ }
}
cb();