Stop undo of just the root prim position in the linkset from shifting the whole linkset.

However, what happens now is that undo just doesn't do anything when the root prim is selected on its own.  This requires more code than just fiddling with undo states.
This commit is contained in:
Justin Clark-Casey (justincc)
2011-07-19 03:38:22 +01:00
parent c94dc95844
commit 7c468cda36
4 changed files with 20 additions and 14 deletions

View File

@@ -59,7 +59,11 @@ namespace OpenSim.Region.Framework.Scenes
{
// m_log.DebugFormat(
// "[UNDO STATE]: Storing undo position {0} for root part", part.ParentGroup.AbsolutePosition);
Position = part.ParentGroup.AbsolutePosition;
if (ForGroup)
Position = part.ParentGroup.AbsolutePosition;
else
Position = part.OffsetPosition;
// m_log.DebugFormat(
// "[UNDO STATE]: Storing undo rotation {0} for root part", part.RotationOffset);
@@ -134,7 +138,10 @@ namespace OpenSim.Region.Framework.Scenes
// "[UNDO STATE]: Undoing position {0} to {1} for root part {2} {3}",
// part.ParentGroup.AbsolutePosition, Position, part.Name, part.LocalId);
part.ParentGroup.AbsolutePosition = Position;
if (ForGroup)
part.ParentGroup.AbsolutePosition = Position;
else
part.OffsetPosition = Position;
}
// m_log.DebugFormat(