diff options
author | UbitUmarov | 2014-09-22 16:09:39 +0100 |
---|---|---|
committer | UbitUmarov | 2014-09-22 16:09:39 +0100 |
commit | ea4a526095c7797e3863f540abb8d439dac3f9d3 (patch) | |
tree | b143c9b8e06081047f670bad8bc24d1a6205d61f /OpenSim/Region/Framework | |
parent | same in a few more spots (diff) | |
download | opensim-SC_OLD-ea4a526095c7797e3863f540abb8d439dac3f9d3.zip opensim-SC_OLD-ea4a526095c7797e3863f540abb8d439dac3f9d3.tar.gz opensim-SC_OLD-ea4a526095c7797e3863f540abb8d439dac3f9d3.tar.bz2 opensim-SC_OLD-ea4a526095c7797e3863f540abb8d439dac3f9d3.tar.xz |
a few more changes on link/unlink
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 17 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 6 |
2 files changed, 10 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index f4ff902..8a65b06 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1962,20 +1962,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
1962 | // slated for unlink, we need to do this | 1962 | // slated for unlink, we need to do this |
1963 | // Unlink the remaining set | 1963 | // Unlink the remaining set |
1964 | // | 1964 | // |
1965 | bool sendEventsToRemainder = true; | 1965 | bool sendEventsToRemainder = false; |
1966 | if (numChildren > 1) | 1966 | if (numChildren == 2) // only one child prim no re-link needed |
1967 | sendEventsToRemainder = false; | 1967 | sendEventsToRemainder = true; |
1968 | 1968 | ||
1969 | foreach (SceneObjectPart p in newSet) | 1969 | foreach (SceneObjectPart p in newSet) |
1970 | { | 1970 | { |
1971 | if (p != group.RootPart) | 1971 | if (p != group.RootPart) |
1972 | { | 1972 | { |
1973 | group.DelinkFromGroup(p, sendEventsToRemainder); | 1973 | group.DelinkFromGroup(p, sendEventsToRemainder); |
1974 | if (numChildren > 2) | 1974 | if (sendEventsToRemainder) // finish single child prim now |
1975 | { | 1975 | { |
1976 | } | ||
1977 | else | ||
1978 | { | ||
1979 | p.ParentGroup.HasGroupChanged = true; | 1976 | p.ParentGroup.HasGroupChanged = true; |
1980 | p.ParentGroup.ScheduleGroupForFullUpdate(); | 1977 | p.ParentGroup.ScheduleGroupForFullUpdate(); |
1981 | } | 1978 | } |
@@ -2008,8 +2005,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2008 | newChild.ClearUpdateSchedule(); | 2005 | newChild.ClearUpdateSchedule(); |
2009 | 2006 | ||
2010 | LinkObjects(newRoot, newSet); | 2007 | LinkObjects(newRoot, newSet); |
2011 | if (!affectedGroups.Contains(newRoot.ParentGroup)) | 2008 | // if (!affectedGroups.Contains(newRoot.ParentGroup)) |
2012 | affectedGroups.Add(newRoot.ParentGroup); | 2009 | // affectedGroups.Add(newRoot.ParentGroup); |
2013 | } | 2010 | } |
2014 | } | 2011 | } |
2015 | 2012 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index b939b58..ca6f457 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -3177,9 +3177,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3177 | 3177 | ||
3178 | m_scene.AddNewSceneObject(objectGroup, true); | 3178 | m_scene.AddNewSceneObject(objectGroup, true); |
3179 | 3179 | ||
3180 | if (sendEvents) | ||
3181 | linkPart.TriggerScriptChangedEvent(Changed.LINK); | ||
3182 | |||
3183 | linkPart.Rezzed = RootPart.Rezzed; | 3180 | linkPart.Rezzed = RootPart.Rezzed; |
3184 | 3181 | ||
3185 | // When we delete a group, we currently have to force persist to the database if the object id has changed | 3182 | // 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 | |||
3194 | 3191 | ||
3195 | objectGroup.HasGroupChangedDueToDelink = true; | 3192 | objectGroup.HasGroupChangedDueToDelink = true; |
3196 | 3193 | ||
3194 | if (sendEvents) | ||
3195 | linkPart.TriggerScriptChangedEvent(Changed.LINK); | ||
3196 | |||
3197 | return objectGroup; | 3197 | return objectGroup; |
3198 | } | 3198 | } |
3199 | 3199 | ||