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_view3d/view3d_edit.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/space_view3d/view3d_edit.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index b4cf08f69fe..e52ff062302 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -507,19 +507,17 @@ void VIEW3D_OT_view_persportho(wmOperatorType *ot) * Wraps walk/fly modes. * \{ */ -static int view3d_navigate_invoke(bContext *C, - wmOperator *UNUSED(op), - const wmEvent *UNUSED(event)) +static int view3d_navigate_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event) { eViewNavigation_Method mode = U.navigation_mode; switch (mode) { case VIEW_NAVIGATION_FLY: - WM_operator_name_call(C, "VIEW3D_OT_fly", WM_OP_INVOKE_DEFAULT, NULL); + WM_operator_name_call(C, "VIEW3D_OT_fly", WM_OP_INVOKE_DEFAULT, NULL, event); break; case VIEW_NAVIGATION_WALK: default: - WM_operator_name_call(C, "VIEW3D_OT_walk", WM_OP_INVOKE_DEFAULT, NULL); + WM_operator_name_call(C, "VIEW3D_OT_walk", WM_OP_INVOKE_DEFAULT, NULL, event); break; } |