* refactor: clean up SOG xml2 reloading to reuse more code

0.6.1-post-fixes
Justin Clarke Casey 2008-11-10 21:06:26 +00:00
parent 58e74b554f
commit 0bda2cf5bc
2 changed files with 4 additions and 13 deletions

View File

@ -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
{

View File

@ -2414,8 +2414,6 @@ if (m_shape != null) {
}
}
if (m_parentGroup.GetSceneMaxUndo() > 0)
{
UndoState nUndo = new UndoState(this);