diff options
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r-- | source/blender/editors/space_graph/graph_edit.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index a35395abaf2..0f3ba9865c4 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -908,17 +908,17 @@ static bool delete_graph_keys(bAnimContext *ac) /* ------------------- */ -static int graphkeys_delete_exec(bContext *C, wmOperator *op) +static int graphkeys_delete_exec(bContext *C, wmOperator *UNUSED(op)) { bAnimContext ac; - bool changed; /* get editor data */ if (ANIM_animdata_get_context(C, &ac) == 0) return OPERATOR_CANCELLED; /* delete keyframes */ - changed = delete_graph_keys(&ac); + if (!delete_graph_keys(&ac)) + return OPERATOR_CANCELLED; /* validate keyframes after editing */ ANIM_editkeyframes_refresh(&ac); @@ -926,9 +926,6 @@ static int graphkeys_delete_exec(bContext *C, wmOperator *op) /* set notifier that keyframes have changed */ WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL); - if (changed) - BKE_report(op->reports, RPT_INFO, "Deleted selected keyframes"); - return OPERATOR_FINISHED; } @@ -940,6 +937,7 @@ void GRAPH_OT_delete(wmOperatorType *ot) ot->description = "Remove all selected keyframes"; /* api callbacks */ + ot->invoke = WM_operator_confirm; ot->exec = graphkeys_delete_exec; ot->poll = graphop_editable_keyframes_poll; |