Do the right translation (compile and continue error)

This commit is contained in:
Lars Brubaker 2017-09-22 18:15:44 -07:00
parent 6619baa532
commit ac634aad6e

View file

@ -99,7 +99,8 @@ namespace MatterHackers.MatterControl
sceneItem.Mesh = loadedItem.Mesh;
sceneItem.Children = loadedItem.Children;
sceneItem.Matrix = loadedItem.Matrix * Matrix4X4.CreateTranslation(-aabb.Center.x, -aabb.Center.y, -sceneItem.GetAxisAlignedBoundingBox(Matrix4X4.Identity).minXYZ.z);
// Copy scale/rotation/translation from the source and Center
sceneItem.Matrix = loadedItem.Matrix * Matrix4X4.CreateTranslation(-aabb.Center.x, -aabb.Center.y, -aabb.minXYZ.z);
sceneItem.Color = loadedItem.Color;
// Notification should force invalidate and redraw