Code

Fix small snapping regression (reported in LP #562205, comment #11)
authorDiederik van Lierop <mailat-signdiedenrezidotnl>
Sun, 9 May 2010 19:02:14 +0000 (21:02 +0200)
committerDiederik van Lierop <mailat-signdiedenrezidotnl>
Sun, 9 May 2010 19:02:14 +0000 (21:02 +0200)
src/snapped-point.cpp
src/ui/tool/node.cpp

index f598cc624f9fe03f37c06e2f1b8d354f3ef46e4b..48efa10e6fd3dacb1c51ee0ac7b6f311c0cf751a 100644 (file)
@@ -170,10 +170,10 @@ bool Inkscape::SnappedPoint::isOtherSnapBetter(Inkscape::SnappedPoint const &oth
     // When snapping to a constraint line only, which is not really a snap but merely a projection
     // to the constraint line, then give this snap a very low priority. Basically, any other snap will do
     if (other_one.getTarget() == SNAPTARGET_CONSTRAINT) {
-        dist_other += NR_HUGE/2;
+        dist_other += 1e6;
     }
     if (getTarget() == SNAPTARGET_CONSTRAINT) {
-        dist_this += NR_HUGE/2;
+        dist_this += 1e6;
     }
 
     // If it's closer
index e9fa79fb3bb4d3c1b8ac603675245a51e6cd6984..56e0ecff86e91a8caef0e326d5b8f3303310724a 100644 (file)
@@ -1039,9 +1039,7 @@ void Node::dragged(Geom::Point &new_pos, GdkEventMotion *event)
                     fp = bp;
                 }
                 fp.getPoint(new_pos);
-                if (fp.getTarget() != SNAPTARGET_CONSTRAINT) {
-                    _desktop->snapindicator->set_new_snaptarget(fp);
-                }
+                _desktop->snapindicator->set_new_snaptarget(fp);
             } else {
                 Geom::Point origin = _last_drag_origin();
                 Geom::Point delta = new_pos - origin;