When snapping constraints to grid, snap the reference point.

This commit is contained in:
whitequark 2016-07-19 14:29:25 +00:00
parent 5af252eaf1
commit c0f5a31401

View File

@ -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