From 93983e214d1e01a2973dfd89d56f467ecc752442 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Tue, 20 May 2008 20:58:56 +0000 Subject: Fix snapping for constrained translation in the selector tool (bzr r5722) --- src/snap.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/snap.cpp') diff --git a/src/snap.cpp b/src/snap.cpp index 46d043ec1..09cdbbaba 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -432,7 +432,13 @@ Inkscape::SnappedPoint SnapManager::_snapTransformed( dedicated_constraint = Inkscape::Snapper::ConstraintLine(origin, (*i) - origin); } else if (transformation_type == STRETCH) { // when non-uniform stretching { dedicated_constraint = Inkscape::Snapper::ConstraintLine((*i), component_vectors[dim]); - } // else: leave the original constraint, e.g. for constrained translation and skewing + } else if (transformation_type == TRANSLATION) { + // When doing a constrained translation, all points will move in the same direction, i.e. + // either horizontally or vertically. The lines along which they move are therefore all + // parallel, but might not be colinear. Therefore we will have to set the point through + // which the constraint-line runs here, for each point individually. + dedicated_constraint.setPoint(*i); + } // else: leave the original constraint, e.g. for skewing if (transformation_type == SCALE && !uniform) { g_warning("Non-uniform constrained scaling is not supported!"); } -- cgit v1.2.3