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.bulletsim
parent
c94dc95844
commit
7c468cda36
|
@ -11224,8 +11224,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (multipleupdate.AgentData.SessionID != SessionId)
|
if (multipleupdate.AgentData.SessionID != SessionId)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
// "[CLIENT]: Incoming MultipleObjectUpdatePacket contained {0} blocks", multipleupdate.ObjectData.Length);
|
"[CLIENT]: Incoming MultipleObjectUpdatePacket contained {0} blocks", multipleupdate.ObjectData.Length);
|
||||||
|
|
||||||
Scene tScene = (Scene)m_scene;
|
Scene tScene = (Scene)m_scene;
|
||||||
|
|
||||||
|
@ -11247,9 +11247,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
// "[CLIENT]: Processing block {0} type {1} for {2} {3}",
|
"[CLIENT]: Processing block {0} type {1} for {2} {3}",
|
||||||
// i, block.Type, part.Name, part.LocalId);
|
i, block.Type, part.Name, part.LocalId);
|
||||||
|
|
||||||
// // Do this once since fetch parts creates a new array.
|
// // Do this once since fetch parts creates a new array.
|
||||||
// SceneObjectPart[] parts = part.ParentGroup.Parts;
|
// SceneObjectPart[] parts = part.ParentGroup.Parts;
|
||||||
|
|
|
@ -1296,7 +1296,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -3705,9 +3705,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
m_undo.Push(nUndo);
|
m_undo.Push(nUndo);
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
// "[SCENE OBJECT PART]: Stored undo state for {0} {1}, stack size now {2}",
|
"[SCENE OBJECT PART]: Stored undo state for {0} {1}, stack size now {2}",
|
||||||
// Name, LocalId, m_undo.Count);
|
Name, LocalId, m_undo.Count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3740,9 +3740,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
lock (m_undo)
|
lock (m_undo)
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
// "[SCENE OBJECT PART]: Handling undo request for {0} {1}, stack size {2}",
|
"[SCENE OBJECT PART]: Handling undo request for {0} {1}, stack size {2}",
|
||||||
// Name, LocalId, m_undo.Count);
|
Name, LocalId, m_undo.Count);
|
||||||
|
|
||||||
if (m_undo.Count > 0)
|
if (m_undo.Count > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -59,7 +59,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[UNDO STATE]: Storing undo position {0} for root part", part.ParentGroup.AbsolutePosition);
|
// "[UNDO STATE]: Storing undo position {0} for root part", part.ParentGroup.AbsolutePosition);
|
||||||
|
|
||||||
|
if (ForGroup)
|
||||||
Position = part.ParentGroup.AbsolutePosition;
|
Position = part.ParentGroup.AbsolutePosition;
|
||||||
|
else
|
||||||
|
Position = part.OffsetPosition;
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[UNDO STATE]: Storing undo rotation {0} for root part", part.RotationOffset);
|
// "[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}",
|
// "[UNDO STATE]: Undoing position {0} to {1} for root part {2} {3}",
|
||||||
// part.ParentGroup.AbsolutePosition, Position, part.Name, part.LocalId);
|
// part.ParentGroup.AbsolutePosition, Position, part.Name, part.LocalId);
|
||||||
|
|
||||||
|
if (ForGroup)
|
||||||
part.ParentGroup.AbsolutePosition = Position;
|
part.ParentGroup.AbsolutePosition = Position;
|
||||||
|
else
|
||||||
|
part.OffsetPosition = Position;
|
||||||
}
|
}
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
|
|
Loading…
Reference in New Issue