summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2018-12-20 16:09:10 +0200
committermaxim_productengine <mnikolenko@productengine.com>2018-12-20 16:09:10 +0200
commitdfe9a02a9bfe101d4aef39d2d4d156a944747bbc (patch)
treeea4b453552d84c8cf474d8aae1ed3ed15ce7e728
parent634910f685057c50ae3233d9f71d4b21cf958749 (diff)
SL-10274 FIXED [EEP] Settings object created by Save As cannot be copied from an object
-rw-r--r--indra/newview/llsettingsvo.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index 0def17b32d..6b1a0a2b77 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -154,23 +154,24 @@ void LLSettingsVOBase::createInventoryItem(const LLSettingsBase::ptr_t &settings
void LLSettingsVOBase::onInventoryItemCreated(const LLUUID &inventoryId, LLSettingsBase::ptr_t settings, inventory_result_fn callback)
{
+ LLViewerInventoryItem *pitem = gInventory.getItem(inventoryId);
+ if (pitem)
+ {
+ LLPermissions perm = pitem->getPermissions();
+ if (perm.getMaskEveryone() != PERM_COPY)
+ {
+ perm.setMaskEveryone(PERM_COPY);
+ pitem->setPermissions(perm);
+ pitem->updateServer(FALSE);
+ }
+ }
if (!settings)
{ // The item was created as new with no settings passed in. Simulator should have given it the default for the type... check ID,
// no need to upload asset.
LLUUID asset_id;
- LLViewerInventoryItem *pitem = gInventory.getItem(inventoryId);
-
if (pitem)
{
asset_id = pitem->getAssetUUID();
-
- LLPermissions perm = pitem->getPermissions();
- if (perm.getMaskEveryone() != PERM_COPY)
- {
- perm.setMaskEveryone(PERM_COPY);
- pitem->setPermissions(perm);
- pitem->updateServer(FALSE);
- }
}
if (callback)
callback(asset_id, inventoryId, LLUUID::null, LLSD());