diff options
author | Melanie | 2012-01-06 13:15:04 +0100 |
---|---|---|
committer | Melanie | 2012-01-06 13:15:04 +0100 |
commit | 31dc5aa7287596cfa89112475bcb120f00cde228 (patch) | |
tree | 0b88cf78ff6868f6897a52c387c02c71e49d3bf5 /OpenSim | |
parent | Fix up asset stuff (diff) | |
download | opensim-SC-31dc5aa7287596cfa89112475bcb120f00cde228.zip opensim-SC-31dc5aa7287596cfa89112475bcb120f00cde228.tar.gz opensim-SC-31dc5aa7287596cfa89112475bcb120f00cde228.tar.bz2 opensim-SC-31dc5aa7287596cfa89112475bcb120f00cde228.tar.xz |
If dragging a script that is no copy from prim inventory into agent
inventory, stop it first in scene. If deleting from prims, move to trash
rather then making it poof.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 1746cfe..e005698 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -996,13 +996,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
996 | if (item == null) | 996 | if (item == null) |
997 | return; | 997 | return; |
998 | 998 | ||
999 | if (item.Type == 10) | 999 | InventoryFolderBase destFolder = InventoryService.GetFolderForType(remoteClient.AgentId, AssetType.TrashFolder); |
1000 | |||
1001 | // Move the item to trash. If this is a copiable item, only | ||
1002 | // a copy will be moved and we will still need to delete | ||
1003 | // the item from the prim. If it was no copy, is will be | ||
1004 | // deleted by this method. | ||
1005 | MoveTaskInventoryItem(remoteClient, destFolder.ID, part, itemID); | ||
1006 | |||
1007 | if (group.GetInventoryItem(localID, itemID) != null) | ||
1000 | { | 1008 | { |
1001 | part.RemoveScriptEvents(itemID); | 1009 | if (item.Type == 10) |
1002 | EventManager.TriggerRemoveScript(localID, itemID); | 1010 | { |
1003 | } | 1011 | part.RemoveScriptEvents(itemID); |
1012 | EventManager.TriggerRemoveScript(localID, itemID); | ||
1013 | } | ||
1004 | 1014 | ||
1005 | group.RemoveInventoryItem(localID, itemID); | 1015 | group.RemoveInventoryItem(localID, itemID); |
1016 | } | ||
1006 | part.SendPropertiesToClient(remoteClient); | 1017 | part.SendPropertiesToClient(remoteClient); |
1007 | } | 1018 | } |
1008 | } | 1019 | } |
@@ -1065,7 +1076,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
1065 | if (!Permissions.BypassPermissions()) | 1076 | if (!Permissions.BypassPermissions()) |
1066 | { | 1077 | { |
1067 | if ((taskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0) | 1078 | if ((taskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0) |
1079 | { | ||
1080 | if (taskItem.Type == 10) | ||
1081 | { | ||
1082 | part.RemoveScriptEvents(itemId); | ||
1083 | EventManager.TriggerRemoveScript(part.LocalId, itemId); | ||
1084 | } | ||
1085 | |||
1068 | part.Inventory.RemoveInventoryItem(itemId); | 1086 | part.Inventory.RemoveInventoryItem(itemId); |
1087 | } | ||
1069 | } | 1088 | } |
1070 | 1089 | ||
1071 | return agentItem; | 1090 | return agentItem; |