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/Tests | |
parent | refactor: Change control structures in SOP.StoreUndoState() to reduce nesting. (diff) | |
download | opensim-SC_OLD-b9934fc4dbb1267409fa7264f3dd83a98959ea87.zip opensim-SC_OLD-b9934fc4dbb1267409fa7264f3dd83a98959ea87.tar.gz opensim-SC_OLD-b9934fc4dbb1267409fa7264f3dd83a98959ea87.tar.bz2 opensim-SC_OLD-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/Tests')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/SceneObjectUndoRedoTests.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUndoRedoTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUndoRedoTests.cs index c93562d..133fac5 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUndoRedoTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUndoRedoTests.cs | |||
@@ -103,6 +103,29 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
103 | } | 103 | } |
104 | 104 | ||
105 | [Test] | 105 | [Test] |
106 | public void TestNoUndoOnObjectsNotInScene() | ||
107 | { | ||
108 | TestHelpers.InMethod(); | ||
109 | |||
110 | Vector3 firstSize = new Vector3(2, 3, 4); | ||
111 | Vector3 secondSize = new Vector3(5, 6, 7); | ||
112 | Vector3 thirdSize = new Vector3(8, 9, 10); | ||
113 | Vector3 fourthSize = new Vector3(11, 12, 13); | ||
114 | |||
115 | Scene scene = new SceneHelpers().SetupScene(); | ||
116 | SceneObjectGroup g1 = SceneHelpers.CreateSceneObject(1, TestHelpers.ParseTail(0x1)); | ||
117 | |||
118 | g1.GroupResize(firstSize); | ||
119 | g1.GroupResize(secondSize); | ||
120 | |||
121 | Assert.That(g1.RootPart.UndoCount, Is.EqualTo(0)); | ||
122 | |||
123 | g1.RootPart.Undo(); | ||
124 | |||
125 | Assert.That(g1.GroupScale, Is.EqualTo(secondSize)); | ||
126 | } | ||
127 | |||
128 | [Test] | ||
106 | public void TestUndoBeyondAvailable() | 129 | public void TestUndoBeyondAvailable() |
107 | { | 130 | { |
108 | TestHelpers.InMethod(); | 131 | TestHelpers.InMethod(); |