Bring "Redo" up to date with "Undo" so it works too
parent
8849b9af8b
commit
be5dd04150
|
@ -155,7 +155,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return false;
|
||||
}
|
||||
|
||||
public void PlaybackState(SceneObjectPart part)
|
||||
private void RestoreState(SceneObjectPart part)
|
||||
{
|
||||
bool GroupChange = false;
|
||||
if ((Type & UndoType.STATE_GROUP_POSITION) != 0
|
||||
|
@ -211,35 +211,13 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
}
|
||||
}
|
||||
public void PlaybackState(SceneObjectPart part)
|
||||
{
|
||||
RestoreState(part);
|
||||
}
|
||||
public void PlayfwdState(SceneObjectPart part)
|
||||
{
|
||||
if (part != null)
|
||||
{
|
||||
part.Undoing = true;
|
||||
|
||||
if (part.ParentID == 0)
|
||||
{
|
||||
if (Position != Vector3.Zero)
|
||||
part.ParentGroup.AbsolutePosition = Position;
|
||||
if (Rotation != Quaternion.Identity)
|
||||
part.UpdateRotation(Rotation);
|
||||
if (Scale != Vector3.Zero)
|
||||
part.Resize(Scale);
|
||||
part.ParentGroup.ScheduleGroupForTerseUpdate();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Position != Vector3.Zero)
|
||||
part.OffsetPosition = Position;
|
||||
if (Rotation != Quaternion.Identity)
|
||||
part.UpdateRotation(Rotation);
|
||||
if (Scale != Vector3.Zero)
|
||||
part.Resize(Scale);
|
||||
part.ScheduleTerseUpdate();
|
||||
}
|
||||
part.Undoing = false;
|
||||
|
||||
}
|
||||
RestoreState(part);
|
||||
}
|
||||
}
|
||||
public class LandUndoState
|
||||
|
@ -267,3 +245,4 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue