diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/UndoState.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/UndoState.cs | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/UndoState.cs b/OpenSim/Region/Framework/Scenes/UndoState.cs index 38bbeb0..1fa8ee2 100644 --- a/OpenSim/Region/Framework/Scenes/UndoState.cs +++ b/OpenSim/Region/Framework/Scenes/UndoState.cs | |||
@@ -42,10 +42,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
42 | public Quaternion Rotation = Quaternion.Identity; | 42 | public Quaternion Rotation = Quaternion.Identity; |
43 | 43 | ||
44 | /// <summary> | 44 | /// <summary> |
45 | /// Is this undo state for an entire group? | ||
46 | /// </summary> | ||
47 | public bool ForGroup; | ||
48 | |||
49 | /// <summary> | ||
45 | /// Constructor. | 50 | /// Constructor. |
46 | /// </summary> | 51 | /// </summary> |
47 | /// <param name="part"></param> | 52 | /// <param name="part"></param> |
48 | public UndoState(SceneObjectPart part) | 53 | /// <param name="forGroup">True if the undo is for an entire group</param> |
54 | public UndoState(SceneObjectPart part, bool forGroup) | ||
49 | { | 55 | { |
50 | if (part != null) | 56 | if (part != null) |
51 | { | 57 | { |
@@ -62,6 +68,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
62 | // m_log.DebugFormat( | 68 | // m_log.DebugFormat( |
63 | // "[UNDO STATE]: Storing undo scale {0} for root part", part.Shape.Scale); | 69 | // "[UNDO STATE]: Storing undo scale {0} for root part", part.Shape.Scale); |
64 | Scale = part.Shape.Scale; | 70 | Scale = part.Shape.Scale; |
71 | |||
72 | ForGroup = forGroup; | ||
65 | } | 73 | } |
66 | else | 74 | else |
67 | { | 75 | { |
@@ -141,7 +149,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
141 | // "[UNDO STATE]: Undoing scale {0} to {1} for root part {2} {3}", | 149 | // "[UNDO STATE]: Undoing scale {0} to {1} for root part {2} {3}", |
142 | // part.Shape.Scale, Scale, part.Name, part.LocalId); | 150 | // part.Shape.Scale, Scale, part.Name, part.LocalId); |
143 | 151 | ||
144 | part.Resize(Scale); | 152 | if (ForGroup) |
153 | part.ParentGroup.GroupResize(Scale); | ||
154 | else | ||
155 | part.Resize(Scale); | ||
145 | } | 156 | } |
146 | 157 | ||
147 | part.ParentGroup.ScheduleGroupForTerseUpdate(); | 158 | part.ParentGroup.ScheduleGroupForTerseUpdate(); |
@@ -194,7 +205,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
194 | part.UpdateRotation(Rotation); | 205 | part.UpdateRotation(Rotation); |
195 | 206 | ||
196 | if (Scale != Vector3.Zero) | 207 | if (Scale != Vector3.Zero) |
197 | part.Resize(Scale); | 208 | { |
209 | if (ForGroup) | ||
210 | part.ParentGroup.GroupResize(Scale); | ||
211 | else | ||
212 | part.Resize(Scale); | ||
213 | } | ||
198 | 214 | ||
199 | part.ParentGroup.ScheduleGroupForTerseUpdate(); | 215 | part.ParentGroup.ScheduleGroupForTerseUpdate(); |
200 | } | 216 | } |
@@ -241,4 +257,4 @@ namespace OpenSim.Region.Framework.Scenes | |||
241 | m_terrainModule.UndoTerrain(m_terrainChannel); | 257 | m_terrainModule.UndoTerrain(m_terrainChannel); |
242 | } | 258 | } |
243 | } | 259 | } |
244 | } | 260 | } \ No newline at end of file |