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
This commit is contained in:
Sybren A. Stüvel
2024-04-22 12:51:16 +02:00
parent eb4204120b
commit 43cd394832

View File

@@ -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) {