diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-11 14:49:47 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-11 14:49:47 +0300 |
commit | 789b1617f70e07f1c9bcb5253f1233acacbf6c8a (patch) | |
tree | f8a67aab8e67b7b7a8a49e28416f0b0b647f1449 /source/blender/editors/interface/interface_templates.c | |
parent | e20fe187066cfb9b1847e656f0f9cef5c5bf7e73 (diff) |
Fix out of order event handling when calling operators from gizmos
Activating a gizmo used the windows eventstate which may have values
newer than the event used to activate the gizmo.
This meant transforms check for the key that activated transform
could be incorrect.
Support passing an event when calling operators to avoid this problem.
Diffstat (limited to 'source/blender/editors/interface/interface_templates.c')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 43968e2c986..09cccbd6b4b 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -2013,7 +2013,7 @@ static void constraint_reorder(bContext *C, Panel *panel, int new_index) RNA_int_set(&props_ptr, "index", new_index); /* Set owner to #EDIT_CONSTRAINT_OWNER_OBJECT or #EDIT_CONSTRAINT_OWNER_BONE. */ RNA_enum_set(&props_ptr, "owner", constraint_from_bone ? 1 : 0); - WM_operator_name_call_ptr(C, ot, WM_OP_INVOKE_DEFAULT, &props_ptr); + WM_operator_name_call_ptr(C, ot, WM_OP_INVOKE_DEFAULT, &props_ptr, NULL); WM_operator_properties_free(&props_ptr); } @@ -5653,7 +5653,7 @@ static void do_running_jobs(bContext *C, void *UNUSED(arg), int event) WM_jobs_stop(CTX_wm_manager(C), CTX_wm_screen(C), NULL); break; case B_STOPANIM: - WM_operator_name_call(C, "SCREEN_OT_animation_play", WM_OP_INVOKE_SCREEN, NULL); + WM_operator_name_call(C, "SCREEN_OT_animation_play", WM_OP_INVOKE_SCREEN, NULL, NULL); break; case B_STOPCOMPO: WM_jobs_stop(CTX_wm_manager(C), CTX_data_scene(C), NULL); |