aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs15
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs2
2 files changed, 4 insertions, 13 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 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 4d54634..05b23aa 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -2414,8 +2414,6 @@ if (m_shape != null) {
2414 } 2414 }
2415 } 2415 }
2416 2416
2417
2418
2419 if (m_parentGroup.GetSceneMaxUndo() > 0) 2417 if (m_parentGroup.GetSceneMaxUndo() > 0)
2420 { 2418 {
2421 UndoState nUndo = new UndoState(this); 2419 UndoState nUndo = new UndoState(this);