From a14e928031be2f8e6f21e38f92a988da684927de Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Fri, 24 Apr 2020 00:10:21 +0300 Subject: [PATCH] On play_animation(), disconnect the other button's toggled signal temporarily - This fixes #219 --- Scripts/AnimationTimeline.gd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Scripts/AnimationTimeline.gd b/Scripts/AnimationTimeline.gd index e3f813440..688a47ccd 100644 --- a/Scripts/AnimationTimeline.gd +++ b/Scripts/AnimationTimeline.gd @@ -248,9 +248,13 @@ func _on_AnimationTimer_timeout() -> void: func play_animation(play : bool, forward_dir : bool) -> void: if forward_dir: + Global.play_backwards.disconnect("toggled", self, "_on_PlayBackwards_toggled") Global.play_backwards.pressed = false + Global.play_backwards.connect("toggled", self, "_on_PlayBackwards_toggled") else: + Global.play_forward.disconnect("toggled", self, "_on_PlayForward_toggled") Global.play_forward.pressed = false + Global.play_forward.connect("toggled", self, "_on_PlayForward_toggled") if Global.canvases.size() == 1: if forward_dir: Global.play_forward.pressed = false