diff options
author | Justin Clark-Casey (justincc) | 2011-07-19 06:05:23 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-07-19 06:05:23 +0100 |
commit | ec1ecd363317fd83fd30f45d9c033873f4c35bc2 (patch) | |
tree | cb6422913fd82350d6719b987cbda9e97436b450 /OpenSim | |
parent | refator: simplify UndoState.Compare() code (diff) | |
download | opensim-SC-ec1ecd363317fd83fd30f45d9c033873f4c35bc2.zip opensim-SC-ec1ecd363317fd83fd30f45d9c033873f4c35bc2.tar.gz opensim-SC-ec1ecd363317fd83fd30f45d9c033873f4c35bc2.tar.bz2 opensim-SC-ec1ecd363317fd83fd30f45d9c033873f4c35bc2.tar.xz |
stop redo throwing an exception if there is nothing to redo
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 9d7f87a..ccf8a25 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -3778,23 +3778,26 @@ namespace OpenSim.Region.Framework.Scenes | |||
3778 | // "[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}", |
3779 | // Name, LocalId, m_redo.Count); | 3779 | // Name, LocalId, m_redo.Count); |
3780 | 3780 | ||
3781 | UndoState gofwd = m_redo.Pop(); | 3781 | if (m_redo.Count > 0) |
3782 | |||
3783 | if (gofwd != null) | ||
3784 | { | 3782 | { |
3785 | if (m_parentGroup.GetSceneMaxUndo() > 0) | 3783 | UndoState gofwd = m_redo.Pop(); |
3784 | |||
3785 | if (gofwd != null) | ||
3786 | { | 3786 | { |
3787 | UndoState nUndo = new UndoState(this, gofwd.ForGroup); | 3787 | if (m_parentGroup.GetSceneMaxUndo() > 0) |
3788 | 3788 | { | |
3789 | m_undo.Push(nUndo); | 3789 | UndoState nUndo = new UndoState(this, gofwd.ForGroup); |
3790 | |||
3791 | m_undo.Push(nUndo); | ||
3792 | } | ||
3793 | |||
3794 | gofwd.PlayfwdState(this); | ||
3790 | } | 3795 | } |
3791 | 3796 | ||
3792 | gofwd.PlayfwdState(this); | ||
3793 | } | ||
3794 | |||
3795 | // m_log.DebugFormat( | 3797 | // m_log.DebugFormat( |
3796 | // "[SCENE OBJECT PART]: Handled redo request for {0} {1}, stack size now {2}", | 3798 | // "[SCENE OBJECT PART]: Handled redo request for {0} {1}, stack size now {2}", |
3797 | // Name, LocalId, m_redo.Count); | 3799 | // Name, LocalId, m_redo.Count); |
3800 | } | ||
3798 | } | 3801 | } |
3799 | } | 3802 | } |
3800 | 3803 | ||