From 4969978f4669d453ff5a80b91b610de18a3df9fb Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Fri, 6 Mar 2020 22:44:48 +0200 Subject: [PATCH] Fix issue with frame moving and current_frame not changing This bug actually originates from before the timeline remake and can be found in v0.6.2 and potentially earlier versions. --- Scripts/FrameButton.gd | 4 ++++ Scripts/Global.gd | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Scripts/FrameButton.gd b/Scripts/FrameButton.gd index 3dbfa87fc..b417c526f 100644 --- a/Scripts/FrameButton.gd +++ b/Scripts/FrameButton.gd @@ -126,6 +126,10 @@ func change_frame_order(rate : int) -> void: Global.undo_redo.add_do_property(Global.canvases[frame], "frame", change) Global.undo_redo.add_do_property(Global.canvases[change], "frame", frame) + if Global.current_frame == frame: + Global.undo_redo.add_do_property(Global, "current_frame", change) + Global.undo_redo.add_undo_property(Global, "current_frame", Global.current_frame) + Global.undo_redo.add_undo_property(Global, "canvases", Global.canvases) Global.undo_redo.add_undo_property(Global.canvases[frame], "frame", frame) Global.undo_redo.add_undo_property(Global.canvases[change], "frame", change) diff --git a/Scripts/Global.gd b/Scripts/Global.gd index 0ef82b5d5..2c5d1f1cf 100644 --- a/Scripts/Global.gd +++ b/Scripts/Global.gd @@ -495,7 +495,6 @@ func canvases_changed(value : Array) -> void: var frame_button = load("res://Prefabs/FrameButton.tscn").instance() frame_button.frame = j frame_button.layer = i - frame_button.pressed = true frame_button.get_child(0).texture = Global.canvases[j].layers[i][1] layers[i][2].add_child(frame_button)