From 93268fef43133553125a5218f234a698f63dc954 Mon Sep 17 00:00:00 2001 From: Manolis Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Sat, 25 Dec 2021 19:21:09 +0200 Subject: [PATCH] Fix another bug with Undo/Redo where the app became unresponsive if the user drew outside the canvas --- src/Tools/Eraser.gd | 4 ++-- src/Tools/Pencil.gd | 4 ++-- src/Tools/Shading.gd | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Tools/Eraser.gd b/src/Tools/Eraser.gd index 338a4f8da..a0848c57e 100644 --- a/src/Tools/Eraser.gd +++ b/src/Tools/Eraser.gd @@ -90,8 +90,8 @@ func draw_end(position: Vector2) -> void: draw_tool(_line_start) draw_fill_gap(_line_start, _line_end) _draw_line = false - if _changed or _drawer.color_op.changed: - commit_undo() + + commit_undo() cursor_text = "" update_random_image() diff --git a/src/Tools/Pencil.gd b/src/Tools/Pencil.gd index d7cc0705f..a69b9d88d 100644 --- a/src/Tools/Pencil.gd +++ b/src/Tools/Pencil.gd @@ -143,8 +143,8 @@ func draw_end(position: Vector2) -> void: v.y = y if Geometry.is_point_in_polygon(v, _draw_points): draw_tool(v) - if _changed or _drawer.color_op.changed: - commit_undo() + + commit_undo() cursor_text = "" update_random_image() diff --git a/src/Tools/Shading.gd b/src/Tools/Shading.gd index 8f304dcdb..e6d46b96f 100644 --- a/src/Tools/Shading.gd +++ b/src/Tools/Shading.gd @@ -265,8 +265,8 @@ func draw_end(position: Vector2) -> void: draw_tool(_line_start) draw_fill_gap(_line_start, _line_end) _draw_line = false - if _changed or _drawer.color_op.changed: - commit_undo() + + commit_undo() cursor_text = "" update_random_image()