Code

guides: switch from using one position coordinate to Geom::Point point_on_line
[inkscape.git] / src / satisfied-guide-cns.cpp
index ece5118c58297175e3f0dcb25a9b078619b728be..11293092561ddd6f39d520402e2c754605fb5fdc 100644 (file)
@@ -13,7 +13,7 @@ void satisfied_guide_cns(SPDesktop const &desktop,
     for (GSList const *l = nv.guides; l != NULL; l = l->next) {
         SPGuide &g = *SP_GUIDE(l->data);
         for (unsigned int i = 0; i < snappoints.size(); ++i) {
-            if (approx_equal(dot(g.normal_to_line, snappoints[i]), g.position)) {
+            if (approx_equal( sp_guide_distance_from_pt(&g, snappoints[i].to_2geom()), 0) ) {
                 cns.push_back(SPGuideConstraint(&g, i));
             }
         }