From fede2d8e6faf4dbb0c819d7b9293f2caf11740ed Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Fri, 22 Nov 2024 02:56:57 +0200 Subject: [PATCH] Fix undo/redo not working if the cursor is over the timeline --- src/UI/Timeline/AnimationTimeline.gd | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/UI/Timeline/AnimationTimeline.gd b/src/UI/Timeline/AnimationTimeline.gd index af8c1c5fb..5173865a1 100644 --- a/src/UI/Timeline/AnimationTimeline.gd +++ b/src/UI/Timeline/AnimationTimeline.gd @@ -140,8 +140,10 @@ func _input(event: InputEvent) -> void: var timeline_rect := Rect2(global_position, size) if timeline_rect.has_point(mouse_pos): if Input.is_key_pressed(KEY_CTRL): - cel_size += (2 * int(event.is_action("zoom_in")) - 2 * int(event.is_action("zoom_out"))) - get_viewport().set_input_as_handled() + var zoom := 2 * int(event.is_action("zoom_in")) - 2 * int(event.is_action("zoom_out")) + cel_size += zoom + if zoom != 0: + get_viewport().set_input_as_handled() func reset_settings() -> void: