summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1cb5e08)
raw | patch | inline | side by side (parent: 1cb5e08)
author | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Wed, 8 Jul 2009 19:30:45 +0000 (19:30 +0000) | ||
committer | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Wed, 8 Jul 2009 19:30:45 +0000 (19:30 +0000) |
src/seltrans.cpp | patch | blob | history |
diff --git a/src/seltrans.cpp b/src/seltrans.cpp
index 64f7d3cdcf526f602883d56e188d4a90d29311a1..3bd5f611ae37e345265ca546f6c6b9ec9c5a07a2 100644 (file)
--- a/src/seltrans.cpp
+++ b/src/seltrans.cpp
void Inkscape::SelTrans::grab(Geom::Point const &p, gdouble x, gdouble y, bool show_handles)
{
Inkscape::Selection *selection = sp_desktop_selection(_desktop);
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
g_return_if_fail(!_grabbed);
@@ -296,7 +297,11 @@ void Inkscape::SelTrans::grab(Geom::Point const &p, gdouble x, gdouble y, bool s
/* Snapping a huge number of nodes will take way too long, so limit the number of snappable nodes
An average user would rarely ever try to snap such a large number of nodes anyway, because
(s)he could hardly discern which node would be snapping */
- _snap_points = snap_points_hull;
+ if (prefs->getBool("/options/snapclosestonly/value", false)) {
+ _keepClosestPointOnly(_snap_points, p);
+ } else {
+ _snap_points = snap_points_hull;
+ }
// Unfortunately, by now we will have lost the font-baseline snappoints :-(
}
@@ -333,7 +338,7 @@ void Inkscape::SelTrans::grab(Geom::Point const &p, gdouble x, gdouble y, bool s
// When snapping the node closest to the mouse pointer is absolutely preferred over the closest snap
// (i.e. when weight == 1), then we will not even try to snap to other points and discard those other
// points immediately.
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+
if (prefs->getBool("/options/snapclosestonly/value", false)) {
if (m.snapprefs.getSnapModeNode()) {
_keepClosestPointOnly(_snap_points, p);
@@ -357,7 +362,6 @@ void Inkscape::SelTrans::grab(Geom::Point const &p, gdouble x, gdouble y, bool s
}
}
-
// Optionally, show the snap source
if (!(_state == STATE_ROTATE && x != 0.5 && y != 0.5)) { // but not when we're draging a rotation handle, because that won't snap
// Now either _bbox_points or _snap_points has a single element, the other one has zero..... or both have zero elements