diff options
Diffstat (limited to 'src/seltrans.cpp')
| -rw-r--r-- | src/seltrans.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/seltrans.cpp b/src/seltrans.cpp index 1c601b3ea..7a08e0a7e 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -1439,13 +1439,17 @@ void Inkscape::SelTrans::moveTo(Geom::Point const &xy, guint state) if (alt) { - /* Alt pressed means keep offset: snap the moved distance to the grid. - ** FIXME: this will snap to more than just the grid, nowadays. - */ + // Alt pressed means: move only by integer multiples of the grid spacing + if (control) { // ... if also constrained to the orthogonal axes + if (fabs(dxy[Geom::X]) > fabs(dxy[Geom::Y])) { + dxy[Geom::Y] = 0; + } else { + dxy[Geom::X] = 0; + } + } m.setup(_desktop, true, _items_const); - m.freeSnapReturnByRef(dxy, Inkscape::SNAPSOURCE_UNDEFINED); - + dxy = m.multipleOfGridPitch(dxy, _point); } else if (shift) { if (control) { // shift & control: constrained movement without snapping if (fabs(dxy[Geom::X]) > fabs(dxy[Geom::Y])) { |
