diff options
author | Hans Goudey <h.goudey@me.com> | 2020-10-15 18:02:44 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-10-15 18:02:44 +0300 |
commit | 15d78ea85b602cfda4e4b825d44bede71a06d86f (patch) | |
tree | 4768379d7e8ef5e055d130ce0c6c610f32c67fd7 /source/blender/editors/interface/interface_handlers.c | |
parent | d1b3439b80fd6e9a0caa653cd55c7a5def18b122 (diff) |
UI: Add reset to default value to keymap
With all the work on DNA defaults for 2.91, it's nice to expose this
convenient operator. This was already hardcoded in the UI code to the
backspace key, adding it to the keymap instead will make the shortcut
automatically show in the button right click menu.
Differential Revision: https://developer.blender.org/D9219
Diffstat (limited to 'source/blender/editors/interface/interface_handlers.c')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 2c1b6d9f9d5..0cc1932d88c 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -7692,19 +7692,6 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent * break; } - /* reset to default (generic function, only use if not handled by switch above) */ - /* XXX hardcoded keymap check.... */ - data = but->active; - if (data && data->state == BUTTON_STATE_HIGHLIGHT) { - if ((retval == WM_UI_HANDLER_CONTINUE) && - (event->type == EVT_BACKSPACEKEY && event->val == KM_PRESS)) { - /* ctrl+backspace = reset active button; backspace = reset a whole array*/ - ui_but_default_set(C, !event->ctrl, true); - ED_region_tag_redraw(data->region); - retval = WM_UI_HANDLER_BREAK; - } - } - #ifdef USE_DRAG_MULTINUM if (data) { if (ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE) || |