From 1fdb16f1cdf6e2722a763cdc0e9b7af9fed27a29 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 19 Jul 2011 05:05:50 +0100 Subject: Fix undo for rotation of the root prim in a linkset on its own. The only obviously broken things right now are the undo of the position of just a root prim (stays in place) and the fact that resizes need two undoes. --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 9076d73..d653e66 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -3013,11 +3013,11 @@ namespace OpenSim.Region.Framework.Scenes /// /// /// - private void UpdateRootRotation(Quaternion rot) + public void UpdateRootRotation(Quaternion rot) { -// m_log.DebugFormat( -// "[SCENE OBJECT GROUP]: Updating root rotation of {0} {1} to {2}", -// Name, LocalId, rot); + m_log.DebugFormat( + "[SCENE OBJECT GROUP]: Updating root rotation of {0} {1} to {2}", + Name, LocalId, rot); Quaternion axRot = rot; Quaternion oldParentRot = m_rootPart.RotationOffset; @@ -3046,6 +3046,7 @@ namespace OpenSim.Region.Framework.Scenes newRot *= Quaternion.Inverse(axRot); prim.RotationOffset = newRot; prim.ScheduleTerseUpdate(); + prim.IgnoreUndoUpdate = false; } } @@ -3054,12 +3055,16 @@ namespace OpenSim.Region.Framework.Scenes SceneObjectPart childpart = parts[i]; if (childpart != m_rootPart) { - childpart.IgnoreUndoUpdate = false; - childpart.StoreUndoState(); +// childpart.IgnoreUndoUpdate = false; +// childpart.StoreUndoState(); } } m_rootPart.ScheduleTerseUpdate(); + + m_log.DebugFormat( + "[SCENE OBJECT GROUP]: Updated root rotation of {0} {1} to {2}", + Name, LocalId, rot); } #endregion -- cgit v1.1