fix undo when resizing of non-root individual prims in a linkset

undo resize, rotation and position still needs fixing when only editing root prim of a linkset
bulletsim
Justin Clark-Casey (justincc) 2011-07-19 03:27:16 +01:00
parent 430a4aeba8
commit c94dc95844
3 changed files with 11 additions and 4 deletions

View File

@ -11424,6 +11424,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerUpdatePrimScale = OnUpdatePrimScale; handlerUpdatePrimScale = OnUpdatePrimScale;
if (handlerUpdatePrimScale != null) if (handlerUpdatePrimScale != null)
{ {
part.StoreUndoState(false);
part.IgnoreUndoUpdate = true;
// m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); // m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
handlerUpdatePrimScale(localId, scale6, this); handlerUpdatePrimScale(localId, scale6, this);
handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition; handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition;
@ -11431,6 +11434,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
handlerUpdatePrimSinglePosition(localId, pos6, this); handlerUpdatePrimSinglePosition(localId, pos6, this);
} }
part.IgnoreUndoUpdate = false;
} }
break; break;

View File

@ -1291,7 +1291,7 @@ namespace OpenSim.Region.Framework.Scenes
{ {
if (m_parentScene.Permissions.CanMoveObject(group.UUID, remoteClient.AgentId)) if (m_parentScene.Permissions.CanMoveObject(group.UUID, remoteClient.AgentId))
{ {
group.UpdateSingleRotation(rot,pos, localID); group.UpdateSingleRotation(rot, pos, localID);
} }
} }
} }

View File

@ -2815,15 +2815,17 @@ namespace OpenSim.Region.Framework.Scenes
{ {
SceneObjectPart part = GetChildPart(localID); SceneObjectPart part = GetChildPart(localID);
SceneObjectPart[] parts = m_parts.GetArray(); // SceneObjectPart[] parts = m_parts.GetArray();
for (int i = 0; i < parts.Length; i++) // for (int i = 0; i < parts.Length; i++)
parts[i].StoreUndoState(); // parts[i].StoreUndoState();
if (part != null) if (part != null)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[SCENE OBJECT GROUP]: Updating single position of {0} {1} to {2}", part.Name, part.LocalId, pos); // "[SCENE OBJECT GROUP]: Updating single position of {0} {1} to {2}", part.Name, part.LocalId, pos);
part.StoreUndoState(false);
if (part.UUID == m_rootPart.UUID) if (part.UUID == m_rootPart.UUID)
{ {
UpdateRootPosition(pos); UpdateRootPosition(pos);