Merge branch 'master' into blender2.8
[blender.git] / source / blender / editors / space_clip / clip_utils.c
index 462be829a23e93faf14a6639a696b05561efb524..272d99c2b0e11e0505bfbf4ea2cec7ac6adc810d 100644 (file)
@@ -71,7 +71,7 @@ void clip_graph_tracking_values_iterate_track(
        BKE_movieclip_get_size(clip, &sc->user, &width, &height);
 
        for (coord = 0; coord < 2; coord++) {
-               int i, prevfra = 0;
+               int i, prevfra = track->markers[0].framenr;
                bool open = false;
                float prevval = 0.0f;
 
@@ -184,6 +184,7 @@ void clip_delete_track(bContext *C, MovieClip *clip, MovieTrackingTrack *track)
        ListBase *tracksbase = BKE_tracking_get_active_tracks(tracking);
        bool has_bundle = false;
        char track_name_escaped[MAX_NAME], prefix[MAX_NAME * 2];
+       const bool used_for_stabilization = (track->flag & (TRACK_USE_2D_STAB | TRACK_USE_2D_STAB_ROT));
 
        if (track == act_track)
                tracking->act_track = NULL;
@@ -205,7 +206,7 @@ void clip_delete_track(bContext *C, MovieClip *clip, MovieTrackingTrack *track)
 
        WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, clip);
 
-       if (track->flag & (TRACK_USE_2D_STAB | TRACK_USE_2D_STAB_ROT)) {
+       if (used_for_stabilization) {
                WM_event_add_notifier(C, NC_MOVIECLIP | ND_DISPLAY, clip);
        }