refactor: Change control structures in SOP.StoreUndoState() to reduce nesting.
parent
36e3123069
commit
31c636f1e4
|
@ -3170,12 +3170,22 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
public void StoreUndoState(bool forGroup)
|
||||
{
|
||||
if (!Undoing)
|
||||
if (Undoing)
|
||||
{
|
||||
if (!IgnoreUndoUpdate)
|
||||
{
|
||||
if (ParentGroup != null)
|
||||
// m_log.DebugFormat(
|
||||
// "[SCENE OBJECT PART]: Ignoring undo store for {0} {1} since already undoing", Name, LocalId);
|
||||
return;
|
||||
}
|
||||
|
||||
if (IgnoreUndoUpdate)
|
||||
{
|
||||
// m_log.DebugFormat("[SCENE OBJECT PART]: Ignoring undo store for {0} {1}", Name, LocalId);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ParentGroup == null)
|
||||
return;
|
||||
|
||||
lock (m_undo)
|
||||
{
|
||||
if (m_undo.Count > 0)
|
||||
|
@ -3217,18 +3227,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// m_log.DebugFormat("[SCENE OBJECT PART]: Ignoring undo store for {0} {1}", Name, LocalId);
|
||||
// }
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// m_log.DebugFormat(
|
||||
// "[SCENE OBJECT PART]: Ignoring undo store for {0} {1} since already undoing", Name, LocalId);
|
||||
// }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return number of undos on the stack. Here temporarily pending a refactor.
|
||||
|
|
Loading…
Reference in New Issue