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/space_console | |
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/space_console')
-rw-r--r-- | source/blender/editors/space_console/console_ops.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_console/space_console.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c index a24eae6a0ce..17fbef23eac 100644 --- a/source/blender/editors/space_console/console_ops.c +++ b/source/blender/editors/space_console/console_ops.c @@ -469,10 +469,10 @@ static int console_indent_or_autocomplete_exec(bContext *C, wmOperator *UNUSED(o } if (text_before_cursor) { - WM_operator_name_call(C, "CONSOLE_OT_autocomplete", WM_OP_INVOKE_DEFAULT, NULL); + WM_operator_name_call(C, "CONSOLE_OT_autocomplete", WM_OP_INVOKE_DEFAULT, NULL, NULL); } else { - WM_operator_name_call(C, "CONSOLE_OT_indent", WM_OP_EXEC_DEFAULT, NULL); + WM_operator_name_call(C, "CONSOLE_OT_indent", WM_OP_EXEC_DEFAULT, NULL, NULL); } return OPERATOR_FINISHED; } @@ -1070,7 +1070,7 @@ static int console_paste_exec(bContext *C, wmOperator *UNUSED(op)) } if (buf_next != buf_str) { - WM_operator_name_call(C, "CONSOLE_OT_execute", WM_OP_EXEC_DEFAULT, NULL); + WM_operator_name_call(C, "CONSOLE_OT_execute", WM_OP_EXEC_DEFAULT, NULL, NULL); ci = console_history_verify(C); } diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c index d051f14d264..8e33f7fa97f 100644 --- a/source/blender/editors/space_console/space_console.c +++ b/source/blender/editors/space_console/space_console.c @@ -189,7 +189,7 @@ static void console_main_region_draw(const bContext *C, ARegion *region) View2D *v2d = ®ion->v2d; if (BLI_listbase_is_empty(&sc->scrollback)) { - WM_operator_name_call((bContext *)C, "CONSOLE_OT_banner", WM_OP_EXEC_DEFAULT, NULL); + WM_operator_name_call((bContext *)C, "CONSOLE_OT_banner", WM_OP_EXEC_DEFAULT, NULL, NULL); } /* clear and setup matrix */ |