SL-10274 FIXED [EEP] Settings object created by Save As cannot be copied from an object

master
maxim_productengine 2018-12-20 16:09:10 +02:00
parent 634910f685
commit dfe9a02a9b
1 changed files with 11 additions and 10 deletions

View File

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