From c0f5a314019549b73a238f16dea8761cc492173e Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 19 Jul 2016 14:29:25 +0000 Subject: [PATCH] When snapping constraints to grid, snap the reference point. --- src/graphicswin.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/graphicswin.cpp b/src/graphicswin.cpp index 61fb4de..5726164 100644 --- a/src/graphicswin.cpp +++ b/src/graphicswin.cpp @@ -911,7 +911,8 @@ void GraphicsWindow::MenuEdit(int id) { SS.MarkGroupDirty(ep->group); } else if(s->constraint.v) { Constraint *c = SK.GetConstraint(s->constraint); - c->disp.offset = SS.GW.SnapToGrid(c->disp.offset); + Vector refp = c->GetReferencePos(); + c->disp.offset = c->disp.offset.Plus(SS.GW.SnapToGrid(refp).Minus(refp)); } } // Regenerate, with these points marked as dragged so that they