From cc3cf17e5e335b6e78d86755e015161ab92c50db Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 15 Oct 2019 18:07:55 +0300 Subject: SL-11907 Fixed assigning permissions to environment when using "Save As" --- indra/newview/llfloaterfixedenvironment.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfloaterfixedenvironment.cpp') diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp index f564dce629..38b1f5066d 100644 --- a/indra/newview/llfloaterfixedenvironment.cpp +++ b/indra/newview/llfloaterfixedenvironment.cpp @@ -250,7 +250,7 @@ LLFloaterSettingsPicker * LLFloaterFixedEnvironment::getSettingsPicker() return picker; } -void LLFloaterFixedEnvironment::loadInventoryItem(const LLUUID &inventoryId) +void LLFloaterFixedEnvironment::loadInventoryItem(const LLUUID &inventoryId, bool can_trans) { if (inventoryId.isNull()) { @@ -290,7 +290,7 @@ void LLFloaterFixedEnvironment::loadInventoryItem(const LLUUID &inventoryId) mCanCopy = mInventoryItem->getPermissions().allowCopyBy(gAgent.getID()); mCanMod = mInventoryItem->getPermissions().allowModifyBy(gAgent.getID()); - mCanTrans = mInventoryItem->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()); + mCanTrans = can_trans && mInventoryItem->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()); LLSettingsVOBase::getSettingsAsset(mInventoryItem->getAssetUUID(), [this](LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, LLExtStat) { onAssetLoaded(asset_id, settings, status); }); @@ -653,6 +653,7 @@ void LLFloaterFixedEnvironment::onInventoryCreated(LLUUID asset_id, LLUUID inven void LLFloaterFixedEnvironment::onInventoryCreated(LLUUID asset_id, LLUUID inventory_id) { + bool can_trans = true; if (mInventoryItem) { LLPermissions perms = mInventoryItem->getPermissions(); @@ -661,13 +662,14 @@ void LLFloaterFixedEnvironment::onInventoryCreated(LLUUID asset_id, LLUUID inven if (created_item) { + can_trans = perms.allowOperationBy(PERM_TRANSFER, gAgent.getID()); created_item->setPermissions(perms); created_item->updateServer(false); } } clearDirtyFlag(); setFocus(TRUE); // Call back the focus... - loadInventoryItem(inventory_id); + loadInventoryItem(inventory_id, can_trans); } void LLFloaterFixedEnvironment::onInventoryUpdated(LLUUID asset_id, LLUUID inventory_id, LLSD results) -- cgit v1.2.3 From e9c0a93f99c4e6a4844da1a93ac261c4b206b79b Mon Sep 17 00:00:00 2001 From: Dave Houlton Date: Thu, 14 Nov 2019 15:19:55 -0700 Subject: Fix merge-related compile errors --- indra/newview/llfloaterfixedenvironment.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llfloaterfixedenvironment.cpp') diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp index 38b1f5066d..41d9a6d99b 100644 --- a/indra/newview/llfloaterfixedenvironment.cpp +++ b/indra/newview/llfloaterfixedenvironment.cpp @@ -402,12 +402,12 @@ void LLFloaterFixedEnvironment::onButtonApply(LLUICtrl *ctrl, const LLSD &data) { setting_clone = water->buildClone(); // LLViewerFetchedTexture and check for FTT_LOCAL_FILE or check LLLocalBitmapMgr - if (LLLocalBitmapMgr::isLocal(water->getNormalMapID())) + if (LLLocalBitmapMgr::getInstance()->isLocal(water->getNormalMapID())) { local_desc = LLTrans::getString("EnvironmentNormalMap"); is_local = true; } - else if (LLLocalBitmapMgr::isLocal(water->getTransparentTextureID())) + else if (LLLocalBitmapMgr::getInstance()->isLocal(water->getTransparentTextureID())) { local_desc = LLTrans::getString("EnvironmentTransparent"); is_local = true; @@ -420,22 +420,22 @@ void LLFloaterFixedEnvironment::onButtonApply(LLUICtrl *ctrl, const LLSD &data) if (sky) { setting_clone = sky->buildClone(); - if (LLLocalBitmapMgr::isLocal(sky->getSunTextureId())) + if (LLLocalBitmapMgr::getInstance()->isLocal(sky->getSunTextureId())) { local_desc = LLTrans::getString("EnvironmentSun"); is_local = true; } - else if (LLLocalBitmapMgr::isLocal(sky->getMoonTextureId())) + else if (LLLocalBitmapMgr::getInstance()->isLocal(sky->getMoonTextureId())) { local_desc = LLTrans::getString("EnvironmentMoon"); is_local = true; } - else if (LLLocalBitmapMgr::isLocal(sky->getCloudNoiseTextureId())) + else if (LLLocalBitmapMgr::getInstance()->isLocal(sky->getCloudNoiseTextureId())) { local_desc = LLTrans::getString("EnvironmentCloudNoise"); is_local = true; } - else if (LLLocalBitmapMgr::isLocal(sky->getBloomTextureId())) + else if (LLLocalBitmapMgr::getInstance()->isLocal(sky->getBloomTextureId())) { local_desc = LLTrans::getString("EnvironmentBloom"); is_local = true; -- cgit v1.2.3