Don't fit objects that have no size

issue: MatterHackers/MCCentral#5431
Changing Text to just a space " " crashes MatterControl
This commit is contained in:
Lars Brubaker 2019-05-01 15:23:24 -07:00
parent 5ee33d059e
commit eafbe2f2b9
2 changed files with 5 additions and 2 deletions

View file

@ -256,7 +256,10 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
break;
}
ItemWithTransform.Matrix = Object3DExtensions.ApplyAtPosition(ItemWithTransform.Matrix, aabb.Center, Matrix4X4.CreateScale(scale));
if (aabb.XSize > 0 && aabb.YSize > 0 && aabb.ZSize > 0)
{
ItemWithTransform.Matrix = Object3DExtensions.ApplyAtPosition(ItemWithTransform.Matrix, aabb.Center, Matrix4X4.CreateScale(scale));
}
}
}

@ -1 +1 @@
Subproject commit 8cdfe6d0fa3c7a178ceefb9cc9d14425e30cb121
Subproject commit 65d8616a1e61cd0745c123f42e39d651cc506bfc