From 6b587688f12dcc027c2f43832f179e4dca73a702 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas Date: Mon, 27 Mar 2023 00:24:40 +0300 Subject: [PATCH] Fix bug where clicking on previous/next frame when only one frame exists makes the cel unselected Apparently this bug exists at least since v0.10 --- src/UI/Timeline/AnimationTimeline.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/UI/Timeline/AnimationTimeline.gd b/src/UI/Timeline/AnimationTimeline.gd index a388273f6..61b1ffe3b 100644 --- a/src/UI/Timeline/AnimationTimeline.gd +++ b/src/UI/Timeline/AnimationTimeline.gd @@ -498,16 +498,16 @@ func play_animation(play: bool, forward_dir: bool) -> void: func _on_NextFrame_pressed() -> void: var project := Global.current_project Global.canvas.selection.transform_content_confirm() - project.selected_cels.clear() if project.current_frame < project.frames.size() - 1: + project.selected_cels.clear() project.change_cel(project.current_frame + 1, -1) func _on_PreviousFrame_pressed() -> void: var project := Global.current_project Global.canvas.selection.transform_content_confirm() - project.selected_cels.clear() if project.current_frame > 0: + project.selected_cels.clear() project.change_cel(project.current_frame - 1, -1)