From 43cd3948321f4538e31c447d1b5010bddc4e1ad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 22 Apr 2024 12:51:16 +0200 Subject: [PATCH] Anim: Slider operators, prevent pass-through of Tab key When a slider operator has only a single 'slider property', disregard Tab keyboard events. This fixes an issue where the Tab key would make the slider operator misbehave in a way that required cancelling the operator and re-starting it. Context: Depending on the specific operator, Tab can be used to toggle between different parameters. The generic handler for modal slider operators didn't take this into account, though, and passed through the Tab key to the rest of Blender, when it wasn't handled by the specific operator. Pull Request: https://projects.blender.org/blender/blender/pulls/120922 --- source/blender/editors/space_graph/graph_slider_ops.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/blender/editors/space_graph/graph_slider_ops.cc b/source/blender/editors/space_graph/graph_slider_ops.cc index 0266658d96e..8ed7227836e 100644 --- a/source/blender/editors/space_graph/graph_slider_ops.cc +++ b/source/blender/editors/space_graph/graph_slider_ops.cc @@ -339,6 +339,12 @@ static int graph_slider_modal(bContext *C, wmOperator *op, const wmEvent *event) break; } + case EVT_TABKEY: + /* Switch between acting on different properties. If this is not handled + * by the caller, it's explicitly gobbled up here to avoid it being passed + * through via the 'default' case. */ + break; + /* When the mouse is moved, the percentage and the keyframes update. */ case MOUSEMOVE: { if (has_numinput == false) {