Code

fix snapmanager initialization
authorDiederik van Lierop <mailat-signdiedenrezidotnl>
Sat, 25 Sep 2010 09:04:23 +0000 (11:04 +0200)
committerDiederik van Lierop <mailat-signdiedenrezidotnl>
Sat, 25 Sep 2010 09:04:23 +0000 (11:04 +0200)
src/ui/tool/node.cpp

index 1070e4bc38d6deb0df3700b0520b406a4e972a9e..575a2f59ee93c750b7f110ba27a9397e065c223b 100644 (file)
@@ -944,7 +944,12 @@ void Node::dragged(Geom::Point &new_pos, GdkEventMotion *event)
 {
     // For a note on how snapping is implemented in Inkscape, see snap.h.
     SnapManager &sm = _desktop->namedview->snap_manager;
+    // even if we won't really snap, we might still call the one of the
+    // constrainedSnap() methods to enforce the constraints, so we need
+    // to setup the snapmanager anyway; this is also required for someSnapperMightSnap()
+    sm.setup(_desktop);
     bool snap = sm.someSnapperMightSnap();
+
     Inkscape::SnappedPoint sp;
     std::vector<Inkscape::SnapCandidatePoint> unselected;
     if (snap) {
@@ -966,11 +971,6 @@ void Node::dragged(Geom::Point &new_pos, GdkEventMotion *event)
             }
         }
         sm.setupIgnoreSelection(_desktop, true, &unselected);
-    } else {
-        // even if we won't really snap, we might still call the one of the
-        // constrainedSnap() methods to enforce the constraints, so we need
-        // to setup the snapmanager anyway
-        sm.setup(_desktop);
     }
 
     if (held_control(*event)) {