Code

3D grid: When snapping, consider both left and right vertical lines next to the point...
authorjohanengelen <johanengelen@users.sourceforge.net>
Tue, 4 Dec 2007 22:25:14 +0000 (22:25 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Tue, 4 Dec 2007 22:25:14 +0000 (22:25 +0000)
src/display/canvas-axonomgrid.cpp

index 76e081a7215a85e4d3fe5526b7618f78e949e168..091f414cf5b029cda7dea8d40b2271950aae0357 100644 (file)
@@ -627,10 +627,10 @@ CanvasAxonomGridSnapper::_getSnapLines(NR::Point const &p) const
         scaled_spacing /= SP_ACTIVE_DESKTOP->current_zoom();
     }
 
-    NR::Coord const rounded = Inkscape::Util::round_to_nearest_multiple_plus(p[0],
-                                                             scaled_spacing,
-                                                             grid->origin[0]);
-
+    NR::Coord rounded;
+    rounded = Inkscape::Util::round_to_nearest_multiple_plus(p[0], scaled_spacing, grid->origin[0]);
+    s.push_back(std::make_pair(NR::Dim2(0), rounded));
+    rounded = Inkscape::Util::round_to_lower_multiple_plus(p[0], scaled_spacing, grid->origin[0]);
     s.push_back(std::make_pair(NR::Dim2(0), rounded));
 
     return s;