more changes on undo/redo group scaling seems to work better

avinationmerge
UbitUmarov 2012-03-09 02:56:14 +00:00
parent 05cdf9bda9
commit e5786ba043
2 changed files with 9 additions and 14 deletions

View File

@ -11760,7 +11760,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
case 0x1D: // (UNIFORM + GROUP + SCALE + POS)
apos = new Vector3(block.Data, 0);
Vector3 scale5 = new Vector3(block.Data, 12);
ascale = new Vector3(block.Data, 12);
handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale;
@ -11770,7 +11770,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
part.StoreUndoState(true);
part.IgnoreUndoUpdate = true;
handlerUpdatePrimGroupScale(localId, scale5, this);
handlerUpdatePrimGroupScale(localId, ascale, this);
handlerUpdateVector = OnUpdatePrimGroupPosition;
if (handlerUpdateVector != null)

View File

@ -74,14 +74,11 @@ namespace OpenSim.Region.Framework.Scenes
ForGroup = forGroup;
Position = part.ParentGroup.AbsolutePosition;
Rotation = part.RotationOffset;
if (!forGroup)
Scale = part.Shape.Scale;
else
Scale = Vector3.Zero; // until we fix it
Scale = part.Shape.Scale;
}
else
{
ForGroup = false; // previus code implies only root parts can undo grp
ForGroup = false; // only root parts can undo grp
Position = part.OffsetPosition;
Rotation = part.RotationOffset;
Scale = part.Shape.Scale;
@ -108,9 +105,7 @@ namespace OpenSim.Region.Framework.Scenes
return false;
if (Rotation != part.RotationOffset)
return false;
if (ForGroup)
return true; // for now don't do grp scale
return (Scale == part.Shape.Scale);
return Scale == part.Shape.Scale;
}
else
{
@ -144,10 +139,9 @@ namespace OpenSim.Region.Framework.Scenes
if (Scale != Vector3.Zero)
{
// if (ForGroup)
// part.ParentGroup.GroupResize(Scale);
// else
if (!ForGroup) // we don't have grp scale for now
if (ForGroup)
part.ParentGroup.GroupResize(Scale);
else
part.Resize(Scale);
}
part.ParentGroup.ScheduleGroupForTerseUpdate();