From 0094971186b7ba96df454acdf221f702bc214be5 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Mon, 16 Sep 2013 13:31:48 +0300 Subject: After finishing to edit an attachment, let other avatars see the changes. (The changes weren't visible before because updates to attachments aren't sent while the attachment is selected.) --- OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 9 ++------- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 3 ++- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 998c19e..cddf818 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs @@ -244,25 +244,20 @@ namespace OpenSim.Region.Framework.Scenes if (part.ParentGroup.RootPart.LocalId != part.LocalId) return; - bool isAttachment = false; - // This is wrong, wrong, wrong. Selection should not be // handled by group, but by prim. Legacy cruft. // TODO: Make selection flagging per prim! // part.ParentGroup.IsSelected = false; - if (part.ParentGroup.IsAttachment) - isAttachment = true; - else - part.ParentGroup.ScheduleGroupForFullUpdate(); + part.ParentGroup.ScheduleGroupForFullUpdate(); // If it's not an attachment, and we are allowed to move it, // then we might have done so. If we moved across a parcel // boundary, we will need to recount prims on the parcels. // For attachments, that makes no sense. // - if (!isAttachment) + if (!part.ParentGroup.IsAttachment) { if (Permissions.CanEditObject( part.UUID, remoteClient.AgentId) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index b3e6b67..9e6c25d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -2700,7 +2700,8 @@ namespace OpenSim.Region.Framework.Scenes return; // This was pulled from SceneViewer. Attachments always receive full updates. - // I could not verify if this is a requirement but this maintains existing behavior + // This is needed because otherwise if only the root prim changes position, then + // it looks as if the entire object has moved (including the other prims). if (ParentGroup.IsAttachment) { ScheduleFullUpdate(); -- cgit v1.1