mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
Use a standard generic system stack for the undo/redo stacks instead of our own homebrew.
system stack also uses an array, so no performance penalty. Also exposes undo count and adds a test assertion for correct undo count after resize
This commit is contained in:
@@ -287,8 +287,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
private string m_sitAnimation = "SIT";
|
||||
private string m_text = String.Empty;
|
||||
private string m_touchName = String.Empty;
|
||||
private readonly UndoStack<UndoState> m_undo = new UndoStack<UndoState>(5);
|
||||
private readonly UndoStack<UndoState> m_redo = new UndoStack<UndoState>(5);
|
||||
private readonly Stack<UndoState> m_undo = new Stack<UndoState>(5);
|
||||
private readonly Stack<UndoState> m_redo = new Stack<UndoState>(5);
|
||||
private UUID _creatorID;
|
||||
|
||||
private bool m_passTouches;
|
||||
@@ -3707,6 +3707,18 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return number of undos on the stack. Here temporarily pending a refactor.
|
||||
/// </summary>
|
||||
public int UndoCount
|
||||
{
|
||||
get
|
||||
{
|
||||
lock (m_undo)
|
||||
return m_undo.Count;
|
||||
}
|
||||
}
|
||||
|
||||
public void Undo()
|
||||
{
|
||||
// m_log.DebugFormat("[SCENE OBJECT PART]: Handling undo request for {0} {1}", Name, LocalId);
|
||||
|
||||
Reference in New Issue
Block a user