aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-07-18 02:01:12 +0100
committerJustin Clark-Casey (justincc)2011-07-18 02:01:12 +0100
commit3f8e571b7887758514645c46b2b26d7c3fc82e45 (patch)
tree446912d24ef58adc3b30e59823f2a342385fcf48 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-3f8e571b7887758514645c46b2b26d7c3fc82e45.zip
opensim-SC_OLD-3f8e571b7887758514645c46b2b26d7c3fc82e45.tar.gz
opensim-SC_OLD-3f8e571b7887758514645c46b2b26d7c3fc82e45.tar.bz2
opensim-SC_OLD-3f8e571b7887758514645c46b2b26d7c3fc82e45.tar.xz
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
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs16
1 files changed, 14 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 253326e..a1200ee 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -287,8 +287,8 @@ namespace OpenSim.Region.Framework.Scenes
287 private string m_sitAnimation = "SIT"; 287 private string m_sitAnimation = "SIT";
288 private string m_text = String.Empty; 288 private string m_text = String.Empty;
289 private string m_touchName = String.Empty; 289 private string m_touchName = String.Empty;
290 private readonly UndoStack<UndoState> m_undo = new UndoStack<UndoState>(5); 290 private readonly Stack<UndoState> m_undo = new Stack<UndoState>(5);
291 private readonly UndoStack<UndoState> m_redo = new UndoStack<UndoState>(5); 291 private readonly Stack<UndoState> m_redo = new Stack<UndoState>(5);
292 private UUID _creatorID; 292 private UUID _creatorID;
293 293
294 private bool m_passTouches; 294 private bool m_passTouches;
@@ -3707,6 +3707,18 @@ namespace OpenSim.Region.Framework.Scenes
3707// } 3707// }
3708 } 3708 }
3709 3709
3710 /// <summary>
3711 /// Return number of undos on the stack. Here temporarily pending a refactor.
3712 /// </summary>
3713 public int UndoCount
3714 {
3715 get
3716 {
3717 lock (m_undo)
3718 return m_undo.Count;
3719 }
3720 }
3721
3710 public void Undo() 3722 public void Undo()
3711 { 3723 {
3712// m_log.DebugFormat("[SCENE OBJECT PART]: Handling undo request for {0} {1}", Name, LocalId); 3724// m_log.DebugFormat("[SCENE OBJECT PART]: Handling undo request for {0} {1}", Name, LocalId);