aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs47
1 files changed, 43 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 6622495..c806fda 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1944,6 +1944,7 @@ namespace OpenSim.Region.Framework.Scenes
1944 1944
1945 PhysActor.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate; 1945 PhysActor.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate;
1946 PhysActor.OnOutOfBounds += PhysicsOutOfBounds; 1946 PhysActor.OnOutOfBounds += PhysicsOutOfBounds;
1947
1947 if (ParentID != 0 && ParentID != LocalId) 1948 if (ParentID != 0 && ParentID != LocalId)
1948 { 1949 {
1949 if (ParentGroup.RootPart.PhysActor != null) 1950 if (ParentGroup.RootPart.PhysActor != null)
@@ -3656,7 +3657,7 @@ namespace OpenSim.Region.Framework.Scenes
3656 ParentGroup.ScheduleGroupForTerseUpdate(); 3657 ParentGroup.ScheduleGroupForTerseUpdate();
3657 //ParentGroup.ScheduleGroupForFullUpdate(); 3658 //ParentGroup.ScheduleGroupForFullUpdate();
3658 } 3659 }
3659 3660/*
3660 public void StoreUndoState() 3661 public void StoreUndoState()
3661 { 3662 {
3662 StoreUndoState(false); 3663 StoreUndoState(false);
@@ -3697,6 +3698,44 @@ namespace OpenSim.Region.Framework.Scenes
3697 } 3698 }
3698 } 3699 }
3699 } 3700 }
3701*/
3702
3703
3704 public void StoreUndoState(ObjectChangeWhat what)
3705 {
3706 if (!Undoing && !IgnoreUndoUpdate) // just to read better - undo is in progress, or suspended
3707 {
3708 if (ParentGroup != null)
3709 {
3710 lock (m_undo)
3711 {
3712 if (m_undo.Count > 0)
3713 {
3714 // see if we had a change
3715
3716 UndoState last = m_undo.Peek();
3717 if (last != null)
3718 {
3719 if (last.Compare(this, what))
3720 {
3721 return;
3722 }
3723 }
3724 }
3725
3726 if (ParentGroup.GetSceneMaxUndo() > 0)
3727 {
3728 UndoState nUndo = new UndoState(this, what);
3729
3730 m_undo.Push(nUndo);
3731
3732 if (m_redo.Count > 0)
3733 m_redo.Clear();
3734 }
3735 }
3736 }
3737 }
3738 }
3700 3739
3701 /// <summary> 3740 /// <summary>
3702 /// Return number of undos on the stack. Here temporarily pending a refactor. 3741 /// Return number of undos on the stack. Here temporarily pending a refactor.
@@ -3725,10 +3764,10 @@ namespace OpenSim.Region.Framework.Scenes
3725 if (goback != null) 3764 if (goback != null)
3726 { 3765 {
3727 UndoState nUndo = null; 3766 UndoState nUndo = null;
3728 3767
3729 if (ParentGroup.GetSceneMaxUndo() > 0) 3768 if (ParentGroup.GetSceneMaxUndo() > 0)
3730 { 3769 {
3731 nUndo = new UndoState(this, goback.ForGroup); 3770 nUndo = new UndoState(this, goback.data.what);
3732 } 3771 }
3733 3772
3734 goback.PlayState(this); 3773 goback.PlayState(this);
@@ -3760,7 +3799,7 @@ namespace OpenSim.Region.Framework.Scenes
3760 { 3799 {
3761 if (ParentGroup.GetSceneMaxUndo() > 0) 3800 if (ParentGroup.GetSceneMaxUndo() > 0)
3762 { 3801 {
3763 UndoState nUndo = new UndoState(this, gofwd.ForGroup); 3802 UndoState nUndo = new UndoState(this, gofwd.data.what);
3764 3803
3765 m_undo.Push(nUndo); 3804 m_undo.Push(nUndo);
3766 } 3805 }