diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-12-20 04:38:07 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-12-20 04:40:33 +0400 |
commit | b2fdc591c36cf5125eaa528b7f735c3c4393d390 (patch) | |
tree | 8f0525ef93d8336a373810b821155bf04995f0bd /source/blender/editors/space_clip/tracking_ops.c | |
parent | 29e3b098253270d4c5cf8337ad068bf4e98d7bdb (diff) |
UI: restore confirmation popups for delete operators.
It turned out this was leading to accidental deleting in some cases when the
info message was missed by users. Fixes T37801.
Diffstat (limited to 'source/blender/editors/space_clip/tracking_ops.c')
-rw-r--r-- | source/blender/editors/space_clip/tracking_ops.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index b198b68b95a..00e470f75f1 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -234,7 +234,7 @@ void CLIP_OT_add_marker_at_click(wmOperatorType *ot) /********************** delete track operator *********************/ -static int delete_track_exec(bContext *C, wmOperator *op) +static int delete_track_exec(bContext *C, wmOperator *UNUSED(op)) { SpaceClip *sc = CTX_wm_space_clip(C); MovieClip *clip = ED_space_clip_get_clip(sc); @@ -274,10 +274,8 @@ static int delete_track_exec(bContext *C, wmOperator *op) /* nothing selected now, unlock view so it can be scrolled nice again */ sc->flag &= ~SC_LOCK_SELECTION; - if (changed) { - BKE_report(op->reports, RPT_INFO, "Deleted selected tracks"); + if (changed) WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, clip); - } return OPERATOR_FINISHED; } @@ -290,6 +288,7 @@ void CLIP_OT_delete_track(wmOperatorType *ot) ot->description = "Delete selected tracks"; /* api callbacks */ + ot->invoke = WM_operator_confirm; ot->exec = delete_track_exec; ot->poll = ED_space_clip_tracking_poll; @@ -299,7 +298,7 @@ void CLIP_OT_delete_track(wmOperatorType *ot) /********************** delete marker operator *********************/ -static int delete_marker_exec(bContext *C, wmOperator *op) +static int delete_marker_exec(bContext *C, wmOperator *UNUSED(op)) { SpaceClip *sc = CTX_wm_space_clip(C); MovieClip *clip = ED_space_clip_get_clip(sc); @@ -359,8 +358,6 @@ static int delete_marker_exec(bContext *C, wmOperator *op) if (!changed) return OPERATOR_CANCELLED; - BKE_report(op->reports, RPT_INFO, "Deleted markers for current frame from selected tracks"); - return OPERATOR_FINISHED; } @@ -372,6 +369,7 @@ void CLIP_OT_delete_marker(wmOperatorType *ot) ot->description = "Delete marker for current frame from selected tracks"; /* api callbacks */ + ot->invoke = WM_operator_confirm; ot->exec = delete_marker_exec; ot->poll = ED_space_clip_tracking_poll; |