From c616335019dc9419460407930af4e40e84663efa Mon Sep 17 00:00:00 2001 From: Tom Grimshaw Date: Sun, 4 Jul 2010 19:58:52 -0700 Subject: Rotation undo fix and remove a debug chatter i missed. Still not working: Individual child prim rotational undo and special cases where the root prim was moved or rotated (all the children then need to restore their offsets). Coming shortly. --- OpenSim/Region/Framework/Scenes/UndoState.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/UndoState.cs b/OpenSim/Region/Framework/Scenes/UndoState.cs index ad05351..f9601e6 100644 --- a/OpenSim/Region/Framework/Scenes/UndoState.cs +++ b/OpenSim/Region/Framework/Scenes/UndoState.cs @@ -68,7 +68,7 @@ namespace OpenSim.Region.Framework.Scenes //FUBAR WARNING: Do NOT get the group's absoluteposition here //or you'll experience a loop and/or a stack issue GroupPosition = part.ParentGroup.RootPart.AbsolutePosition; - GroupRotation = part.ParentGroup.Rotation; + GroupRotation = part.ParentGroup.GroupRotation; Position = part.ParentGroup.RootPart.AbsolutePosition; Rotation = part.RotationOffset; Scale = part.Shape.Scale; @@ -98,7 +98,6 @@ namespace OpenSim.Region.Framework.Scenes } if ((Type & UndoType.STATE_GROUP_SCALE) == 0 || ((last.Type & UndoType.STATE_GROUP_SCALE) >= (Type & UndoType.STATE_GROUP_SCALE))) { - Console.WriteLine("Setting groupscale to " + last.GroupScale.ToString()); GroupScale = last.GroupScale; Scale = last.Scale; } @@ -184,7 +183,7 @@ namespace OpenSim.Region.Framework.Scenes if (GroupChange) { part.ParentGroup.RootPart.Undoing = true; - if (Position != Vector3.Zero) + if (GroupPosition != Vector3.Zero) { //Calculate the scale... Vector3 gs = part.Shape.Scale; @@ -193,7 +192,7 @@ namespace OpenSim.Region.Framework.Scenes //Scale first since it can affect our position part.ParentGroup.GroupResize(gs * scale, part.LocalId); part.ParentGroup.AbsolutePosition = GroupPosition; - part.ParentGroup.Rotation = GroupRotation; + part.ParentGroup.UpdateGroupRotationR(GroupRotation); } part.ParentGroup.RootPart.Undoing = false; -- cgit v1.1