Fix T61536: can't snap vertex to another vertex in edit mode using curves
authorSebastian Parborg <darkdefende@gmail.com>
Thu, 14 Feb 2019 13:49:47 +0000 (14:49 +0100)
committerSebastian Parborg <darkdefende@gmail.com>
Thu, 14 Feb 2019 13:54:05 +0000 (14:54 +0100)
Previously, the curve self snapping would only snap to points that were
earlier in the curve structure. This was because of a simple coding
snafu of using break when meaning to use continue.

source/blender/editors/transform/transform_snap_object.c

index 101c0f0356ce3060b4e96caf84382ba6e3fd0bb7..9916aa846d6876f729a3a60788d03c868f9c8f5e 100644 (file)
@@ -1537,7 +1537,7 @@ static short snapCurve(
                                        if (nu->bezt) {
                                                /* don't snap to selected (moving) or hidden */
                                                if (nu->bezt[u].f2 & SELECT || nu->bezt[u].hide != 0) {
-                                                       break;
+                                                       continue;
                                                }
                                                has_snap |= test_projected_vert_dist(
                                                        &neasrest_precalc,
@@ -1567,7 +1567,7 @@ static short snapCurve(
                                        else {
                                                /* don't snap to selected (moving) or hidden */
                                                if (nu->bp[u].f1 & SELECT || nu->bp[u].hide != 0) {
-                                                       break;
+                                                       continue;
                                                }
                                                has_snap |= test_projected_vert_dist(
                                                        &neasrest_precalc,