diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2020-11-26 17:30:45 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2021-01-06 13:35:06 +0300 |
commit | 290b6d7ef327d963084792b65f7d8c79810b5e1f (patch) | |
tree | 9288ecd5f8a97eb452edb669a0612b48dd654020 /source/blender/editors/space_graph/graph_edit.c | |
parent | 4b56c1829073d85a9c9dedd5e6cd7bd8b584debd (diff) |
Fix T70316: Custom "Delete Keyframes" shortcut still requires
confirmation
Deleting keyframes in the dopesheet or graph editor always required
confirmation, even if used ouside of the "Delete" menus.
Now add a "confirm" option [same as for deleting objects], which can be
disabled for immediate keyframe deletion.
This will also change the default behavior and bring this in line with
how object deletion works so there is one shortcut for bringing up the
menu/confirmation and another shortcut to delete immediately without
requiring confirmation / another click:
- Blender Default keymap: "X" for menu, "Del" for immediate
- Industry Compatible: "Backspace" for menu, "Del" for immediate
Maniphest Tasks: T70316
Differential Revision: https://developer.blender.org/D9651
Diffstat (limited to 'source/blender/editors/space_graph/graph_edit.c')
-rw-r--r-- | source/blender/editors/space_graph/graph_edit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 9b47e5ce2c3..fac38ef7b91 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -757,12 +757,13 @@ void GRAPH_OT_delete(wmOperatorType *ot) ot->description = "Remove all selected keyframes"; /* API callbacks */ - ot->invoke = WM_operator_confirm; + ot->invoke = WM_operator_confirm_or_exec; ot->exec = graphkeys_delete_exec; ot->poll = graphop_editable_keyframes_poll; /* Flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; + WM_operator_properties_confirm_or_exec(ot); } /** \} */ |