aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-07-19 05:46:17 +0100
committerJustin Clark-Casey (justincc)2011-07-19 05:46:17 +0100
commitbc3679b67dc074a9ef1e0e6ffb07bca844eb93c9 (patch)
tree84818e8bf78d0f82d783b9ca94f29e5788198067 /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
parentrefactor: rename UpdatePrimPosition() to UpdatePrimGroupPosition() for consis... (diff)
downloadopensim-SC_OLD-bc3679b67dc074a9ef1e0e6ffb07bca844eb93c9.zip
opensim-SC_OLD-bc3679b67dc074a9ef1e0e6ffb07bca844eb93c9.tar.gz
opensim-SC_OLD-bc3679b67dc074a9ef1e0e6ffb07bca844eb93c9.tar.bz2
opensim-SC_OLD-bc3679b67dc074a9ef1e0e6ffb07bca844eb93c9.tar.xz
Fix undo when changing just the root prim's position in a linkset.
I think (ha ha) this largely fixes undo, except for the fact that rotation a set of prims with 'edit linked parts' selected doesn't quite work properly (though this works fine if the checkbox isn't selected). Also, the double undo bug for resize is still present. Redo might be incredibly buggy, haven't even looked at that yet.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 26b35a3..b6fb5a4 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -2825,6 +2825,7 @@ namespace OpenSim.Region.Framework.Scenes
2825// "[SCENE OBJECT GROUP]: Updating single position of {0} {1} to {2}", part.Name, part.LocalId, pos); 2825// "[SCENE OBJECT GROUP]: Updating single position of {0} {1} to {2}", part.Name, part.LocalId, pos);
2826 2826
2827 part.StoreUndoState(false); 2827 part.StoreUndoState(false);
2828 part.IgnoreUndoUpdate = true;
2828 2829
2829 if (part.UUID == m_rootPart.UUID) 2830 if (part.UUID == m_rootPart.UUID)
2830 { 2831 {
@@ -2836,6 +2837,7 @@ namespace OpenSim.Region.Framework.Scenes
2836 } 2837 }
2837 2838
2838 HasGroupChanged = true; 2839 HasGroupChanged = true;
2840 part.IgnoreUndoUpdate = false;
2839 } 2841 }
2840 } 2842 }
2841 2843
@@ -2848,9 +2850,9 @@ namespace OpenSim.Region.Framework.Scenes
2848// m_log.DebugFormat( 2850// m_log.DebugFormat(
2849// "[SCENE OBJECT GROUP]: Updating root position of {0} {1} to {2}", Name, LocalId, pos); 2851// "[SCENE OBJECT GROUP]: Updating root position of {0} {1} to {2}", Name, LocalId, pos);
2850 2852
2851 SceneObjectPart[] parts = m_parts.GetArray(); 2853// SceneObjectPart[] parts = m_parts.GetArray();
2852 for (int i = 0; i < parts.Length; i++) 2854// for (int i = 0; i < parts.Length; i++)
2853 parts[i].StoreUndoState(); 2855// parts[i].StoreUndoState();
2854 2856
2855 Vector3 newPos = new Vector3(pos.X, pos.Y, pos.Z); 2857 Vector3 newPos = new Vector3(pos.X, pos.Y, pos.Z);
2856 Vector3 oldPos = 2858 Vector3 oldPos =
@@ -2863,7 +2865,7 @@ namespace OpenSim.Region.Framework.Scenes
2863 axDiff *= Quaternion.Inverse(partRotation); 2865 axDiff *= Quaternion.Inverse(partRotation);
2864 diff = axDiff; 2866 diff = axDiff;
2865 2867
2866 parts = m_parts.GetArray(); 2868 SceneObjectPart[] parts = m_parts.GetArray();
2867 for (int i = 0; i < parts.Length; i++) 2869 for (int i = 0; i < parts.Length; i++)
2868 { 2870 {
2869 SceneObjectPart obPart = parts[i]; 2871 SceneObjectPart obPart = parts[i];