Fix SceneObjectUndoRedoTests.TestNoUndoOnObjectsNotInScene by not looking up ParentGroup scale limits if part is not in a sog

0.7.4-post-fixes
Justin Clark-Casey (justincc) 2012-11-15 02:38:57 +00:00
parent 38fb0430bf
commit 09aa87ba26
1 changed files with 12 additions and 9 deletions

View File

@ -2367,6 +2367,8 @@ namespace OpenSim.Region.Framework.Scenes
/// </remarks> /// </remarks>
/// <param name="scale"></param> /// <param name="scale"></param>
public void Resize(Vector3 scale) public void Resize(Vector3 scale)
{
if (ParentGroup.Scene != null)
{ {
scale.X = Math.Min(scale.X, ParentGroup.Scene.m_maxNonphys); scale.X = Math.Min(scale.X, ParentGroup.Scene.m_maxNonphys);
scale.Y = Math.Min(scale.Y, ParentGroup.Scene.m_maxNonphys); scale.Y = Math.Min(scale.Y, ParentGroup.Scene.m_maxNonphys);
@ -2380,6 +2382,7 @@ namespace OpenSim.Region.Framework.Scenes
scale.Y = Math.Min(scale.Y, ParentGroup.Scene.m_maxPhys); scale.Y = Math.Min(scale.Y, ParentGroup.Scene.m_maxPhys);
scale.Z = Math.Min(scale.Z, ParentGroup.Scene.m_maxPhys); scale.Z = Math.Min(scale.Z, ParentGroup.Scene.m_maxPhys);
} }
}
// m_log.DebugFormat("[SCENE OBJECT PART]: Resizing {0} {1} to {2}", Name, LocalId, scale); // m_log.DebugFormat("[SCENE OBJECT PART]: Resizing {0} {1} to {2}", Name, LocalId, scale);