diff options
author | Merov Linden <merov@lindenlab.com> | 2014-07-22 15:54:53 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-07-22 15:54:53 -0700 |
commit | 87a7eee21d986e2a1c8b5fd467b5da06112690b5 (patch) | |
tree | 609741b2e3d0bfe72843342c19e67b7d78f602f4 /indra/newview/llfloatergesture.cpp | |
parent | cec79bdb29ac5438c9b9bb0312b4981116f17f61 (diff) | |
parent | 532433674c9553636af9ea8d433b9da6d6fae587 (diff) |
Sync merge with lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llfloatergesture.cpp')
-rwxr-xr-x | indra/newview/llfloatergesture.cpp | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index 9797b5c062..7da65a9a7c 100755 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -48,6 +48,7 @@ #include "llviewermenu.h" #include "llviewerinventory.h" #include "llviewercontrol.h" +#include "llfloaterperms.h" BOOL item_name_precedes( LLInventoryItem* a, LLInventoryItem* b ) { @@ -74,6 +75,17 @@ public: void fire(const LLUUID &inv_item) { LLPreviewGesture::show(inv_item, LLUUID::null); + + LLInventoryItem* item = gInventory.getItem(inv_item); + if (item) + { + LLPermissions perm = item->getPermissions(); + perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Gestures")); + perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Gestures")); + perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Gestures")); + item->setPermissions(perm); + item->updateServer(FALSE); + } } }; @@ -449,9 +461,17 @@ void LLFloaterGesture::onClickPlay() void LLFloaterGesture::onClickNew() { LLPointer<LLInventoryCallback> cb = new GestureShowCallback(); - create_inventory_item(gAgent.getID(), gAgent.getSessionID(), - LLUUID::null, LLTransactionID::tnull, "New Gesture", "", LLAssetType::AT_GESTURE, - LLInventoryType::IT_GESTURE, NOT_WEARABLE, PERM_MOVE | PERM_TRANSFER, cb); + create_inventory_item(gAgent.getID(), + gAgent.getSessionID(), + LLUUID::null, + LLTransactionID::tnull, + "New Gesture", + "", + LLAssetType::AT_GESTURE, + LLInventoryType::IT_GESTURE, + NOT_WEARABLE, + PERM_MOVE | LLFloaterPerms::getNextOwnerPerms("Gestures"), + cb); } void LLFloaterGesture::onActivateBtnClick() |