Do not use search area of unselected tracks when searching for nearest
authorSergey Sharybin <sergey.vfx@gmail.com>
Sun, 27 Nov 2011 19:27:13 +0000 (19:27 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sun, 27 Nov 2011 19:27:13 +0000 (19:27 +0000)
track on mouse selection operator.

source/blender/editors/space_clip/tracking_ops.c

index e5a5109d796a521f2f7cdb7e4a0b0d299dc1599c..6eb5e511bc43feb0795ec2c68dff0b5d8e5cbb10 100644 (file)
@@ -741,7 +741,7 @@ static MovieTrackingTrack *find_nearest_track(SpaceClip *sc, MovieClip *clip, fl
                                d2= dist_to_rect(co, marker->pos, cur->pat_min, cur->pat_max);
 
                        /* distance to search boundbox */
-                       if(sc->flag&SC_SHOW_MARKER_SEARCH)
+                       if(sc->flag&SC_SHOW_MARKER_SEARCH && TRACK_VIEW_SELECTED(sc, cur))
                                d3= dist_to_rect(co, marker->pos, cur->search_min, cur->search_max);
 
                        /* choose minimal distance. useful for cases of overlapped markers. */