diff options
Diffstat (limited to 'indra/newview/llfloaterfixedenvironment.cpp')
-rw-r--r-- | indra/newview/llfloaterfixedenvironment.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp index 5eac6b317b..dfd60acb50 100644 --- a/indra/newview/llfloaterfixedenvironment.cpp +++ b/indra/newview/llfloaterfixedenvironment.cpp @@ -117,7 +117,8 @@ LLFloaterFixedEnvironment::LLFloaterFixedEnvironment(const LLSD &key) : mInventoryItem(nullptr), mIsDirty(false), mCanCopy(false), - mCanMod(false) + mCanMod(false), + mCanTrans(false) { } @@ -257,6 +258,7 @@ void LLFloaterFixedEnvironment::loadInventoryItem(const LLUUID &inventoryId) mInventoryId.setNull(); mCanMod = true; mCanCopy = true; + mCanTrans = true; return; } @@ -288,6 +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()); LLSettingsVOBase::getSettingsAsset(mInventoryItem->getAssetUUID(), [this](LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, LLExtStat) { onAssetLoaded(asset_id, settings, status); }); @@ -348,6 +351,21 @@ void LLFloaterFixedEnvironment::onAssetLoaded(LLUUID asset_id, LLSettingsBase::p if (mInventoryItem) mSettings->setName(mInventoryItem->getName()); + if (mCanCopy) + settings->clearFlag(LLSettingsBase::FLAG_NOCOPY); + else + settings->setFlag(LLSettingsBase::FLAG_NOCOPY); + + if (mCanMod) + settings->clearFlag(LLSettingsBase::FLAG_NOMOD); + else + settings->setFlag(LLSettingsBase::FLAG_NOMOD); + + if (mCanTrans) + settings->clearFlag(LLSettingsBase::FLAG_NOTRANS); + else + settings->setFlag(LLSettingsBase::FLAG_NOTRANS); + updateEditEnvironment(); syncronizeTabs(); refresh(); |