aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs40
1 files changed, 25 insertions, 15 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 5038afc..d6aef95 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -1177,7 +1177,10 @@ namespace OpenSim.Region.Environment.Scenes
1177 1177
1178 public void ClearUndoState() 1178 public void ClearUndoState()
1179 { 1179 {
1180 m_undo.Clear(); 1180 lock(m_undo)
1181 {
1182 m_undo.Clear();
1183 }
1181 StoreUndoState(); 1184 StoreUndoState();
1182 } 1185 }
1183 1186
@@ -2446,22 +2449,26 @@ namespace OpenSim.Region.Environment.Scenes
2446 { 2449 {
2447 if (m_parentGroup != null) 2450 if (m_parentGroup != null)
2448 { 2451 {
2449 if (m_undo.Count > 0) 2452 lock(m_undo)
2450 { 2453 {
2451 UndoState last = m_undo.Peek(); 2454 if (m_undo.Count > 0)
2452 if (last != null)
2453 { 2455 {
2454 if (last.Compare(this)) 2456 UndoState last = m_undo.Peek();
2455 return; 2457 if (last != null)
2458 {
2459 if (last.Compare(this))
2460 return;
2461 }
2456 } 2462 }
2457 } 2463
2458 2464
2459 2465
2460 if (m_parentGroup.GetSceneMaxUndo() > 0) 2466 if (m_parentGroup.GetSceneMaxUndo() > 0)
2461 { 2467 {
2462 UndoState nUndo = new UndoState(this); 2468 UndoState nUndo = new UndoState(this);
2463 2469
2464 m_undo.Push(nUndo); 2470 m_undo.Push(nUndo);
2471 }
2465 2472
2466 } 2473 }
2467 } 2474 }
@@ -2951,11 +2958,14 @@ namespace OpenSim.Region.Environment.Scenes
2951 2958
2952 public void Undo() 2959 public void Undo()
2953 { 2960 {
2954 if (m_undo.Count > 0) 2961 lock(m_undo)
2955 { 2962 {
2956 UndoState goback = m_undo.Pop(); 2963 if (m_undo.Count > 0)
2957 if (goback != null) 2964 {
2958 goback.PlaybackState(this); 2965 UndoState goback = m_undo.Pop();
2966 if (goback != null)
2967 goback.PlaybackState(this);
2968 }
2959 } 2969 }
2960 } 2970 }
2961 2971