diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2008-05-20 20:58:56 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2008-05-20 20:58:56 +0000 |
| commit | 93983e214d1e01a2973dfd89d56f467ecc752442 (patch) | |
| tree | b309898de26853716c129680f331eddcabf6ee46 /src/snap.cpp | |
| parent | Improve snapping behaviour when creating new shapes (diff) | |
| download | inkscape-93983e214d1e01a2973dfd89d56f467ecc752442.tar.gz inkscape-93983e214d1e01a2973dfd89d56f467ecc752442.zip | |
Fix snapping for constrained translation in the selector tool
(bzr r5722)
Diffstat (limited to 'src/snap.cpp')
| -rw-r--r-- | src/snap.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
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!"); } |
