From dffaf1d504dde0b4ded3c50d3831fe07d79a881e Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas Date: Sun, 24 Dec 2023 14:47:35 +0200 Subject: [PATCH] Fix bug where the wrong cel would be drawn on the canvas when undoing --- src/UI/Canvas/Canvas.gd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/UI/Canvas/Canvas.gd b/src/UI/Canvas/Canvas.gd index c6c855716..3fc32b802 100644 --- a/src/UI/Canvas/Canvas.gd +++ b/src/UI/Canvas/Canvas.gd @@ -116,6 +116,9 @@ func update_texture(layer_i: int, frame_i := -1, project := Global.current_proje current_cel.update_texture() # Needed so that changes happening to the non-selected layer(s) are also visible # e.g. when undoing/redoing, when applying image effects to the entire frame, etc + if frame_i != project.current_frame: + # Don't update if the cel is on a different frame (can happen with undo/redo) + return var layer := project.layers[layer_i] var cel_image: Image if Global.display_layer_effects: