From fef7627f73323cc7a69df59204ad70220f747e4c Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Tue, 21 Apr 2020 19:42:01 +0300 Subject: [PATCH] Made the animation stop playing on clear_canvases() This stop the animation from playing when a new image is being created, or a file is being loaded. --- Scripts/Global.gd | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Scripts/Global.gd b/Scripts/Global.gd index a94472ffd..cf2767d32 100644 --- a/Scripts/Global.gd +++ b/Scripts/Global.gd @@ -575,6 +575,11 @@ func clear_canvases() -> void: animation_tags.clear() self.animation_tags = animation_tags # To execute animation_tags_changed() + # Stop playing the animation + play_backwards.pressed = false + play_forward.pressed = false + animation_timer.stop() + window_title = "(" + tr("untitled") + ") - Pixelorama" undo_redo.clear_history(false)