diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 9afe8cdf13..f5c58385f9 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -454,11 +454,7 @@ namespace OpenSim.Region.Environment.Scenes reader.Read(); reader.ReadStartElement("SceneObjectGroup"); - m_rootPart = SceneObjectPart.FromXml(reader); - m_rootPart.SetParent(this); - m_parts.Add(m_rootPart.UUID, m_rootPart); - m_rootPart.ParentID = 0; - m_rootPart.LinkNum = 0; + SetRootPart(SceneObjectPart.FromXml(reader)); reader.Read(); bool more = true; @@ -470,12 +466,9 @@ namespace OpenSim.Region.Environment.Scenes case XmlNodeType.Element: if (reader.Name == "SceneObjectPart") { - SceneObjectPart Part = SceneObjectPart.FromXml(reader); - if (m_rootPart.LinkNum == 0) - m_rootPart.LinkNum++; - AddPart(Part); - Part.LinkNum = m_parts.Count; - Part.StoreUndoState(); + SceneObjectPart part = SceneObjectPart.FromXml(reader); + AddPart(part); + part.StoreUndoState(); } else { diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 4d546347d1..05b23aa559 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -2414,8 +2414,6 @@ if (m_shape != null) { } } - - if (m_parentGroup.GetSceneMaxUndo() > 0) { UndoState nUndo = new UndoState(this);