aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs15
1 files changed, 4 insertions, 11 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 9afe8cd..f5c5838 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -454,11 +454,7 @@ namespace OpenSim.Region.Environment.Scenes
454 reader.Read(); 454 reader.Read();
455 455
456 reader.ReadStartElement("SceneObjectGroup"); 456 reader.ReadStartElement("SceneObjectGroup");
457 m_rootPart = SceneObjectPart.FromXml(reader); 457 SetRootPart(SceneObjectPart.FromXml(reader));
458 m_rootPart.SetParent(this);
459 m_parts.Add(m_rootPart.UUID, m_rootPart);
460 m_rootPart.ParentID = 0;
461 m_rootPart.LinkNum = 0;
462 458
463 reader.Read(); 459 reader.Read();
464 bool more = true; 460 bool more = true;
@@ -470,12 +466,9 @@ namespace OpenSim.Region.Environment.Scenes
470 case XmlNodeType.Element: 466 case XmlNodeType.Element:
471 if (reader.Name == "SceneObjectPart") 467 if (reader.Name == "SceneObjectPart")
472 { 468 {
473 SceneObjectPart Part = SceneObjectPart.FromXml(reader); 469 SceneObjectPart part = SceneObjectPart.FromXml(reader);
474 if (m_rootPart.LinkNum == 0) 470 AddPart(part);
475 m_rootPart.LinkNum++; 471 part.StoreUndoState();
476 AddPart(Part);
477 Part.LinkNum = m_parts.Count;
478 Part.StoreUndoState();
479 } 472 }
480 else 473 else
481 { 474 {