summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterfixedenvironment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterfixedenvironment.cpp')
-rw-r--r--indra/newview/llfloaterfixedenvironment.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp
index 05da640258..dccfca62a4 100644
--- a/indra/newview/llfloaterfixedenvironment.cpp
+++ b/indra/newview/llfloaterfixedenvironment.cpp
@@ -560,6 +560,19 @@ void LLFloaterFixedEnvironment::doApplyUpdateInventory(const LLSettingsBase::ptr
void LLFloaterFixedEnvironment::doApplyEnvironment(const std::string &where, const LLSettingsBase::ptr_t &settings)
{
+ U32 flags(0);
+
+ if (mInventoryItem)
+ {
+ if (!mInventoryItem->getPermissions().allowOperationBy(PERM_MODIFY, gAgent.getID()))
+ flags |= LLSettingsBase::FLAG_NOMOD;
+ if (!mInventoryItem->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
+ flags |= LLSettingsBase::FLAG_NOTRANS;
+ }
+
+ flags |= settings->getFlags();
+ settings->setFlag(flags);
+
if (where == ACTION_APPLY_LOCAL)
{
LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, settings);
@@ -577,7 +590,7 @@ void LLFloaterFixedEnvironment::doApplyEnvironment(const std::string &where, con
if (mInventoryItem && !isDirty())
{
- LLEnvironment::instance().updateParcel(parcel->getLocalID(), mInventoryItem->getAssetUUID(), mInventoryItem->getName(), LLEnvironment::NO_TRACK, -1, -1);
+ LLEnvironment::instance().updateParcel(parcel->getLocalID(), mInventoryItem->getAssetUUID(), mInventoryItem->getName(), LLEnvironment::NO_TRACK, -1, -1, flags);
}
else if (settings->getSettingsType() == "sky")
{
@@ -592,7 +605,7 @@ void LLFloaterFixedEnvironment::doApplyEnvironment(const std::string &where, con
{
if (mInventoryItem && !isDirty())
{
- LLEnvironment::instance().updateRegion(mInventoryItem->getAssetUUID(), mInventoryItem->getName(), LLEnvironment::NO_TRACK, -1, -1);
+ LLEnvironment::instance().updateRegion(mInventoryItem->getAssetUUID(), mInventoryItem->getName(), LLEnvironment::NO_TRACK, -1, -1, flags);
}
else if (settings->getSettingsType() == "sky")
{