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.cs63
1 files changed, 26 insertions, 37 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 893faf8..6988718 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -852,7 +852,7 @@ namespace OpenSim.Region.Framework.Scenes
852 852
853 set 853 set
854 { 854 {
855 StoreUndoState(UndoType.STATE_PRIM_ROTATION); 855 StoreUndoState();
856 m_rotationOffset = value; 856 m_rotationOffset = value;
857 857
858 PhysicsActor actor = PhysActor; 858 PhysicsActor actor = PhysActor;
@@ -3590,7 +3590,8 @@ namespace OpenSim.Region.Framework.Scenes
3590 m_parentGroup.ScheduleGroupForTerseUpdate(); 3590 m_parentGroup.ScheduleGroupForTerseUpdate();
3591 //m_parentGroup.ScheduleGroupForFullUpdate(); 3591 //m_parentGroup.ScheduleGroupForFullUpdate();
3592 } 3592 }
3593 public void StoreUndoState(UndoType type) 3593
3594 public void StoreUndoState()
3594 { 3595 {
3595 StoreUndoState(false); 3596 StoreUndoState(false);
3596 } 3597 }
@@ -3613,57 +3614,45 @@ namespace OpenSim.Region.Framework.Scenes
3613 // TODO: May need to fix for group comparison 3614 // TODO: May need to fix for group comparison
3614 if (last.Compare(this)) 3615 if (last.Compare(this))
3615 { 3616 {
3616 // m_log.DebugFormat( 3617 // m_log.DebugFormat(
3617 // "[SCENE OBJECT PART]: Not storing undo for {0} {1} since current state is same as last undo state, initial stack size {2}", 3618 // "[SCENE OBJECT PART]: Not storing undo for {0} {1} since current state is same as last undo state, initial stack size {2}",
3618 // Name, LocalId, m_undo.Count); 3619 // Name, LocalId, m_undo.Count);
3619 3620
3620 return; 3621 return;
3621 } 3622 }
3622 } 3623 }
3623 } 3624 }
3624 3625
3625 // m_log.DebugFormat( 3626 // m_log.DebugFormat(
3626 // "[SCENE OBJECT PART]: Storing undo state for {0} {1}, forGroup {2}, initial stack size {3}", 3627 // "[SCENE OBJECT PART]: Storing undo state for {0} {1}, forGroup {2}, initial stack size {3}",
3627 // Name, LocalId, forGroup, m_undo.Count); 3628 // Name, LocalId, forGroup, m_undo.Count);
3628 3629
3629 if (m_parentGroup.GetSceneMaxUndo() > 0) 3630 if (m_parentGroup.GetSceneMaxUndo() > 0)
3630 { 3631 {
3631 UndoState nUndo = new UndoState(this, forGroup); 3632 UndoState nUndo = new UndoState(this, forGroup);
3632
3633 UndoState nUndo = new UndoState(this, type);
3634 3633
3635 if (lastUndo != null)
3636 {
3637 TimeSpan ts = DateTime.Now.Subtract(lastUndo.LastUpdated);
3638 if (ts.TotalMilliseconds < 500)
3639 {
3640 //Delete the last entry since it was less than 500 milliseconds ago
3641 nUndo.Merge(lastUndo);
3642 m_undo.Pop();
3643 }
3644 }
3645 m_undo.Push(nUndo); 3634 m_undo.Push(nUndo);
3646 3635
3647 if (m_redo.Count > 0) 3636 if (m_redo.Count > 0)
3648 m_redo.Clear(); 3637 m_redo.Clear();
3649 3638
3650 // m_log.DebugFormat( 3639 // m_log.DebugFormat(
3651 // "[SCENE OBJECT PART]: Stored undo state for {0} {1}, forGroup {2}, stack size now {3}", 3640 // "[SCENE OBJECT PART]: Stored undo state for {0} {1}, forGroup {2}, stack size now {3}",
3652 // Name, LocalId, forGroup, m_undo.Count); 3641 // Name, LocalId, forGroup, m_undo.Count);
3653 } 3642 }
3654 } 3643 }
3655 } 3644 }
3656 } 3645 }
3657// else 3646 // else
3658// { 3647 // {
3659// m_log.DebugFormat("[SCENE OBJECT PART]: Ignoring undo store for {0} {1}", Name, LocalId); 3648 // m_log.DebugFormat("[SCENE OBJECT PART]: Ignoring undo store for {0} {1}", Name, LocalId);
3660// } 3649 // }
3661 } 3650 }
3662// else 3651 // else
3663// { 3652 // {
3664// m_log.DebugFormat( 3653 // m_log.DebugFormat(
3665// "[SCENE OBJECT PART]: Ignoring undo store for {0} {1} since already undoing", Name, LocalId); 3654 // "[SCENE OBJECT PART]: Ignoring undo store for {0} {1} since already undoing", Name, LocalId);
3666// } 3655 // }
3667 } 3656 }
3668 3657
3669 /// <summary> 3658 /// <summary>