Skip to content

Commit

Permalink
Fix undo/redo not working if the cursor is over the timeline
Browse files Browse the repository at this point in the history
  • Loading branch information
OverloadedOrama committed Nov 22, 2024
1 parent d0ecf3b commit fede2d8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/UI/Timeline/AnimationTimeline.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit fede2d8

Please sign in to comment.