diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-20 02:06:02 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-20 02:06:02 +0300 |
commit | 47139c69d7e46975c273a8f6981aca9e5cdda1d1 (patch) | |
tree | c20f21cdfa23f46ac018ff33af1839e5dc7a66fa /source/blender/windowmanager/intern/wm_operator_props.c | |
parent | 750690ae7a5c5331921dede7e62b095619154c70 (diff) |
Keymap: only use delete confirmation for X-key
Only use confirmation w/ X-key since this is more likely to be pressed
by accident. Delete-key delete doesn't confirm.
Part of D3953 by @Zachman w/ edits
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operator_props.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operator_props.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_operator_props.c b/source/blender/windowmanager/intern/wm_operator_props.c index 4515223f829..f8fa652ed63 100644 --- a/source/blender/windowmanager/intern/wm_operator_props.c +++ b/source/blender/windowmanager/intern/wm_operator_props.c @@ -44,6 +44,15 @@ #include "WM_api.h" #include "WM_types.h" + +void WM_operator_properties_confirm_or_exec(wmOperatorType *ot) +{ + PropertyRNA *prop; + + prop = RNA_def_boolean(ot->srna, "confirm", true, "Confirm", "Prompt for confirmation"); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); +} + /* default properties for fileselect */ void WM_operator_properties_filesel( wmOperatorType *ot, int filter, short type, short action, |