diff options
author | Justin Clark-Casey (justincc) | 2011-07-19 03:38:22 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-07-19 03:38:22 +0100 |
commit | 7c468cda360b9a9382986c3a029b799fd49bf898 (patch) | |
tree | 1abc41267041a08aa2d6462a0652ce4a1de94753 /OpenSim/Region/Framework/Scenes/UndoState.cs | |
parent | fix undo when resizing of non-root individual prims in a linkset (diff) | |
download | opensim-SC_OLD-7c468cda360b9a9382986c3a029b799fd49bf898.zip opensim-SC_OLD-7c468cda360b9a9382986c3a029b799fd49bf898.tar.gz opensim-SC_OLD-7c468cda360b9a9382986c3a029b799fd49bf898.tar.bz2 opensim-SC_OLD-7c468cda360b9a9382986c3a029b799fd49bf898.tar.xz |
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.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/UndoState.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/UndoState.cs b/OpenSim/Region/Framework/Scenes/UndoState.cs index 1fa8ee2..faa1f9e 100644 --- a/OpenSim/Region/Framework/Scenes/UndoState.cs +++ b/OpenSim/Region/Framework/Scenes/UndoState.cs | |||
@@ -59,7 +59,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
59 | { | 59 | { |
60 | // m_log.DebugFormat( | 60 | // m_log.DebugFormat( |
61 | // "[UNDO STATE]: Storing undo position {0} for root part", part.ParentGroup.AbsolutePosition); | 61 | // "[UNDO STATE]: Storing undo position {0} for root part", part.ParentGroup.AbsolutePosition); |
62 | Position = part.ParentGroup.AbsolutePosition; | 62 | |
63 | if (ForGroup) | ||
64 | Position = part.ParentGroup.AbsolutePosition; | ||
65 | else | ||
66 | Position = part.OffsetPosition; | ||
63 | 67 | ||
64 | // m_log.DebugFormat( | 68 | // m_log.DebugFormat( |
65 | // "[UNDO STATE]: Storing undo rotation {0} for root part", part.RotationOffset); | 69 | // "[UNDO STATE]: Storing undo rotation {0} for root part", part.RotationOffset); |
@@ -134,7 +138,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
134 | // "[UNDO STATE]: Undoing position {0} to {1} for root part {2} {3}", | 138 | // "[UNDO STATE]: Undoing position {0} to {1} for root part {2} {3}", |
135 | // part.ParentGroup.AbsolutePosition, Position, part.Name, part.LocalId); | 139 | // part.ParentGroup.AbsolutePosition, Position, part.Name, part.LocalId); |
136 | 140 | ||
137 | part.ParentGroup.AbsolutePosition = Position; | 141 | if (ForGroup) |
142 | part.ParentGroup.AbsolutePosition = Position; | ||
143 | else | ||
144 | part.OffsetPosition = Position; | ||
138 | } | 145 | } |
139 | 146 | ||
140 | // m_log.DebugFormat( | 147 | // m_log.DebugFormat( |