diff --git a/MatterControlLib/PartPreviewWindow/View3D/View3DWidget.cs b/MatterControlLib/PartPreviewWindow/View3D/View3DWidget.cs index 5d4d04ebf..9cd362eef 100644 --- a/MatterControlLib/PartPreviewWindow/View3D/View3DWidget.cs +++ b/MatterControlLib/PartPreviewWindow/View3D/View3DWidget.cs @@ -1785,7 +1785,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow } double xToSnap = xSnapOffset + delta.X; - double snappedX = ((int)((xToSnap / snapGridDistance) + .5)) * snapGridDistance; + double snappedX = Math.Round(xToSnap / snapGridDistance) * snapGridDistance; delta.X = snappedX - xSnapOffset; double ySnapOffset = selectedBounds.MinXYZ.Y; @@ -1798,7 +1798,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow } double yToSnap = ySnapOffset + delta.Y; - double snappedY = ((int)((yToSnap / snapGridDistance) + .5)) * snapGridDistance; + double snappedY = Math.Round(yToSnap / snapGridDistance) * snapGridDistance; delta.Y = snappedY - ySnapOffset; } diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index b5824a230..a4a900756 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit b5824a2309f04f710250bd75dfb2f5cfada5a7bc +Subproject commit a4a900756db5e0c310c6ff49762aa4414320854c