diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 44d7ce3..5414cf2 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -3665,6 +3665,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
3665 | 3665 | ||
3666 | public void StoreUndoState() | 3666 | public void StoreUndoState() |
3667 | { | 3667 | { |
3668 | StoreUndoState(false); | ||
3669 | } | ||
3670 | |||
3671 | public void StoreUndoState(bool forGroup) | ||
3672 | { | ||
3668 | if (!Undoing) | 3673 | if (!Undoing) |
3669 | { | 3674 | { |
3670 | if (!IgnoreUndoUpdate) | 3675 | if (!IgnoreUndoUpdate) |
@@ -3678,6 +3683,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3678 | UndoState last = m_undo.Peek(); | 3683 | UndoState last = m_undo.Peek(); |
3679 | if (last != null) | 3684 | if (last != null) |
3680 | { | 3685 | { |
3686 | // TODO: May need to fix for group comparison | ||
3681 | if (last.Compare(this)) | 3687 | if (last.Compare(this)) |
3682 | { | 3688 | { |
3683 | // m_log.DebugFormat( | 3689 | // m_log.DebugFormat( |
@@ -3690,12 +3696,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
3690 | } | 3696 | } |
3691 | 3697 | ||
3692 | // m_log.DebugFormat( | 3698 | // m_log.DebugFormat( |
3693 | // "[SCENE OBJECT PART]: Storing undo state for {0} {1}, initial stack size {2}", | 3699 | // "[SCENE OBJECT PART]: Storing undo state for {0} {1}, forGroup {2}, initial stack size {3}", |
3694 | // Name, LocalId, m_undo.Count); | 3700 | // Name, LocalId, forGroup, m_undo.Count); |
3695 | 3701 | ||
3696 | if (m_parentGroup.GetSceneMaxUndo() > 0) | 3702 | if (m_parentGroup.GetSceneMaxUndo() > 0) |
3697 | { | 3703 | { |
3698 | UndoState nUndo = new UndoState(this); | 3704 | UndoState nUndo = new UndoState(this, forGroup); |
3699 | 3705 | ||
3700 | m_undo.Push(nUndo); | 3706 | m_undo.Push(nUndo); |
3701 | 3707 | ||
@@ -3740,17 +3746,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
3740 | 3746 | ||
3741 | if (m_undo.Count > 0) | 3747 | if (m_undo.Count > 0) |
3742 | { | 3748 | { |
3743 | UndoState nUndo = null; | ||
3744 | |||
3745 | if (m_parentGroup.GetSceneMaxUndo() > 0) | ||
3746 | { | ||
3747 | nUndo = new UndoState(this); | ||
3748 | } | ||
3749 | |||
3750 | UndoState goback = m_undo.Pop(); | 3749 | UndoState goback = m_undo.Pop(); |
3751 | 3750 | ||
3752 | if (goback != null) | 3751 | if (goback != null) |
3753 | { | 3752 | { |
3753 | UndoState nUndo = null; | ||
3754 | |||
3755 | if (m_parentGroup.GetSceneMaxUndo() > 0) | ||
3756 | { | ||
3757 | nUndo = new UndoState(this, goback.ForGroup); | ||
3758 | } | ||
3759 | |||
3754 | goback.PlaybackState(this); | 3760 | goback.PlaybackState(this); |
3755 | 3761 | ||
3756 | if (nUndo != null) | 3762 | if (nUndo != null) |
@@ -3772,17 +3778,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
3772 | // "[SCENE OBJECT PART]: Handling redo request for {0} {1}, stack size {2}", | 3778 | // "[SCENE OBJECT PART]: Handling redo request for {0} {1}, stack size {2}", |
3773 | // Name, LocalId, m_redo.Count); | 3779 | // Name, LocalId, m_redo.Count); |
3774 | 3780 | ||
3775 | if (m_parentGroup.GetSceneMaxUndo() > 0) | ||
3776 | { | ||
3777 | UndoState nUndo = new UndoState(this); | ||
3778 | |||
3779 | m_undo.Push(nUndo); | ||
3780 | } | ||
3781 | |||
3782 | UndoState gofwd = m_redo.Pop(); | 3781 | UndoState gofwd = m_redo.Pop(); |
3783 | 3782 | ||
3784 | if (gofwd != null) | 3783 | if (gofwd != null) |
3784 | { | ||
3785 | if (m_parentGroup.GetSceneMaxUndo() > 0) | ||
3786 | { | ||
3787 | UndoState nUndo = new UndoState(this, gofwd.ForGroup); | ||
3788 | |||
3789 | m_undo.Push(nUndo); | ||
3790 | } | ||
3791 | |||
3785 | gofwd.PlayfwdState(this); | 3792 | gofwd.PlayfwdState(this); |
3793 | } | ||
3786 | 3794 | ||
3787 | // m_log.DebugFormat( | 3795 | // m_log.DebugFormat( |
3788 | // "[SCENE OBJECT PART]: Handled redo request for {0} {1}, stack size now {2}", | 3796 | // "[SCENE OBJECT PART]: Handled redo request for {0} {1}, stack size now {2}", |