a few more changes on link/unlink

avinationmerge
UbitUmarov 2014-09-22 16:09:39 +01:00
parent b7fca5bcac
commit ea4a526095
2 changed files with 10 additions and 13 deletions

View File

@ -1962,20 +1962,17 @@ namespace OpenSim.Region.Framework.Scenes
// slated for unlink, we need to do this
// Unlink the remaining set
//
bool sendEventsToRemainder = true;
if (numChildren > 1)
sendEventsToRemainder = false;
bool sendEventsToRemainder = false;
if (numChildren == 2) // only one child prim no re-link needed
sendEventsToRemainder = true;
foreach (SceneObjectPart p in newSet)
{
if (p != group.RootPart)
{
group.DelinkFromGroup(p, sendEventsToRemainder);
if (numChildren > 2)
{
}
else
{
if (sendEventsToRemainder) // finish single child prim now
{
p.ParentGroup.HasGroupChanged = true;
p.ParentGroup.ScheduleGroupForFullUpdate();
}
@ -2008,8 +2005,8 @@ namespace OpenSim.Region.Framework.Scenes
newChild.ClearUpdateSchedule();
LinkObjects(newRoot, newSet);
if (!affectedGroups.Contains(newRoot.ParentGroup))
affectedGroups.Add(newRoot.ParentGroup);
// if (!affectedGroups.Contains(newRoot.ParentGroup))
// affectedGroups.Add(newRoot.ParentGroup);
}
}

View File

@ -3177,9 +3177,6 @@ namespace OpenSim.Region.Framework.Scenes
m_scene.AddNewSceneObject(objectGroup, true);
if (sendEvents)
linkPart.TriggerScriptChangedEvent(Changed.LINK);
linkPart.Rezzed = RootPart.Rezzed;
// When we delete a group, we currently have to force persist to the database if the object id has changed
@ -3194,6 +3191,9 @@ namespace OpenSim.Region.Framework.Scenes
objectGroup.HasGroupChangedDueToDelink = true;
if (sendEvents)
linkPart.TriggerScriptChangedEvent(Changed.LINK);
return objectGroup;
}