* refactor: clean up SOG xml2 reloading to reuse more code
parent
58e74b554f
commit
0bda2cf5bc
|
@ -454,11 +454,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
reader.Read();
|
reader.Read();
|
||||||
|
|
||||||
reader.ReadStartElement("SceneObjectGroup");
|
reader.ReadStartElement("SceneObjectGroup");
|
||||||
m_rootPart = SceneObjectPart.FromXml(reader);
|
SetRootPart(SceneObjectPart.FromXml(reader));
|
||||||
m_rootPart.SetParent(this);
|
|
||||||
m_parts.Add(m_rootPart.UUID, m_rootPart);
|
|
||||||
m_rootPart.ParentID = 0;
|
|
||||||
m_rootPart.LinkNum = 0;
|
|
||||||
|
|
||||||
reader.Read();
|
reader.Read();
|
||||||
bool more = true;
|
bool more = true;
|
||||||
|
@ -470,12 +466,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
case XmlNodeType.Element:
|
case XmlNodeType.Element:
|
||||||
if (reader.Name == "SceneObjectPart")
|
if (reader.Name == "SceneObjectPart")
|
||||||
{
|
{
|
||||||
SceneObjectPart Part = SceneObjectPart.FromXml(reader);
|
SceneObjectPart part = SceneObjectPart.FromXml(reader);
|
||||||
if (m_rootPart.LinkNum == 0)
|
AddPart(part);
|
||||||
m_rootPart.LinkNum++;
|
part.StoreUndoState();
|
||||||
AddPart(Part);
|
|
||||||
Part.LinkNum = m_parts.Count;
|
|
||||||
Part.StoreUndoState();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -2414,8 +2414,6 @@ if (m_shape != null) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (m_parentGroup.GetSceneMaxUndo() > 0)
|
if (m_parentGroup.GetSceneMaxUndo() > 0)
|
||||||
{
|
{
|
||||||
UndoState nUndo = new UndoState(this);
|
UndoState nUndo = new UndoState(this);
|
||||||
|
|
Loading…
Reference in New Issue