a few more changes on link/unlink
parent
b7fca5bcac
commit
ea4a526095
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue