diff options
author | Justin Clark-Casey (justincc) | 2012-09-26 23:31:10 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-09-26 23:31:10 +0100 |
commit | b9934fc4dbb1267409fa7264f3dd83a98959ea87 (patch) | |
tree | 0731834144103dedce03270151e01d166987c933 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |
parent | refactor: Change control structures in SOP.StoreUndoState() to reduce nesting. (diff) | |
download | opensim-SC-b9934fc4dbb1267409fa7264f3dd83a98959ea87.zip opensim-SC-b9934fc4dbb1267409fa7264f3dd83a98959ea87.tar.gz opensim-SC-b9934fc4dbb1267409fa7264f3dd83a98959ea87.tar.bz2 opensim-SC-b9934fc4dbb1267409fa7264f3dd83a98959ea87.tar.xz |
Don't store undo states if a scene object is manipulated when it is not in a scene.
Adds regression test for this.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 8710c3e..3d4bc3c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -3170,6 +3170,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3170 | 3170 | ||
3171 | public void StoreUndoState(bool forGroup) | 3171 | public void StoreUndoState(bool forGroup) |
3172 | { | 3172 | { |
3173 | if (ParentGroup == null || ParentGroup.Scene == null) | ||
3174 | return; | ||
3175 | |||
3173 | if (Undoing) | 3176 | if (Undoing) |
3174 | { | 3177 | { |
3175 | // m_log.DebugFormat( | 3178 | // m_log.DebugFormat( |
@@ -3183,9 +3186,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3183 | return; | 3186 | return; |
3184 | } | 3187 | } |
3185 | 3188 | ||
3186 | if (ParentGroup == null) | ||
3187 | return; | ||
3188 | |||
3189 | lock (m_undo) | 3189 | lock (m_undo) |
3190 | { | 3190 | { |
3191 | if (m_undo.Count > 0) | 3191 | if (m_undo.Count > 0) |